Computing.Net > Forums > Web Development > Java Script break URL mask

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Java Script break URL mask

Reply to Message Icon

Name: robdos
Date: March 28, 2004 at 02:42:02 Pacific
OS: XP
CPU/Ram: 2500/1024
Comment:

Hi

I have a domain redirecting to some free web space. Everything is fine, if i create standard html pages with links the URL is always static, the real url is never displayed.

However, I'm using the following Java Script to create a drop down, but this breaks the URL mask and the real web address is displayed.

<script language="JavaScript" type="text/JavaScript">


</script>

<div align="left">
<table width="801" border="0">
<tr>
<td><div align="center">
<form name="form1">
<select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
<option value="******.htm" selected>****</option>
<option value="****.htm">Computers</option>
<option value="****.htm">***</option>
<option value="****.htm">***</option>
</select>
</form>
</div></td>
</tr>
</table>

Does any one know a way around this?

Cheers,

Rob



Sponsored Link
Ads by Google

Response Number 1
Name: robdos
Date: March 28, 2004 at 02:44:17 Pacific
Reply:

function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}



0

Response Number 2
Name: SN
Date: March 30, 2004 at 10:37:04 Pacific
Reply:

The problem is this:
<select name="menu1" onChange="MM_jumpMenu('parent',this,0)">

This tells MM_jumpMenu to replace the parent (very top page, where the url is) to the page.

Try changing it to:
<select name="menu1" onChange="MM_jumpMenu('window',this,0)">
or, better yet,
<select name="menu1" onChange="MM_jumpMenu('document',this,0)">

Good luck,
-SN


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Java Script break URL mask

Java Script Problem www.computing.net/answers/webdevel/java-script-problem/2090.html

Calling java script functions www.computing.net/answers/webdevel/calling-java-script-functions/1166.html

Merge 2 java scripts www.computing.net/answers/webdevel/merge-2-java-scripts/563.html