1.

Solve : JavaScript Object Expected??

Answer»

Code: [Select]function choose(idn)
{
var c = comfirm('Are you sure you want to erase all files and start over?');
if(c==true) {
var hrefk = "http://www.herbertsworld.com/index.php?action=select&ID=" + idn;
window.location = hrefk;
}
}
I don't have any clues on what is wrong.Is this is the or ?
What is the "idn" variable?Well, Its in s.js and I link it into the file inside the head tag's.

The links to activate it are:

CREATE your own[/url]


Bluesteel Valthem[/url]


American Valtch[/url]


Western Airway[/url]

Try getting rid of the "var hrefk", like so:

Code: [Select]function choose(idn)
{
  var c = comfirm('Are you sure you want to erase all files and start over?');
  if(c==true) {
    window.location = "http://www.herbertsworld.com/index.php?action=select&id=" + idn;
  }
}
You might also try this for where you call the function:

Code: [Select]<td valign="top">
<a href="#" ONCLICK="Javascript:choose('none');">Create your own</a>
</td>
<td valign="top">
<a href="#" onClick="Javascript:choose('1');">Bluesteel Valthem</a>
</td>
<td valign="top">
<a href="#" onClick="Javascript:choose('2');">American Valtch</a>
</td>
<td valign="top">
<a href="#" onClick="Javascript:choose('3');">Western Airway</a>
</td>
Nope, It still does it.
Need an example?
http://herbertsworld.com/index.php?action=style#
CLICK one of the blue links in the page.



Discussion

No Comment Found