Just Can't Open Drop Downs in Same Window

K

Kim14

Help!

I am trying to create a webpage and it would be obvious to anyone who
reads my source code (it's a mess) that I created it using a template.
I know almost nothing about webpages, but am happy with all but a few
bugs in my page.

I have read many posts about opening drop-downs in new windows, and
have spent hours looking over my source code to see what I have done
wrong.

My links open in the same window like I want, but ALL of my drop-downs
open in a new window!

Can someone please have mercy on me and help???
Thanks for any advice you can give.

Kim
 
R

RobB

Kim14 said:
Help!

I am trying to create a webpage and it would be obvious to anyone who
reads my source code...

(snip)

No danger of that.
I have spent hours looking over my source code to see what I have done
wrong.

(snip)
No one out here will spend 'hours', but 'minutes' might work wonders.
 
K

Kim14

Sorry, didn't mean to offend you... just thought this was a place where
someone might offer some help to a newcomer just starting out-
apparently I knocked on the wrong door.
 
R

RobB

Kim14 said:
Sorry, didn't mean to offend you... just thought this was a place where
someone might offer some help to a newcomer just starting out-
apparently I knocked on the wrong door.

Not offended at all ! If you were reading your post, instead of writing
it, how would you 'offer some help' in fixing coding you couldn't see?

A bit like diagnosing car trouble over the phone. Post the HTML for
those selects & any JavaScript called (presumably onchange) by them.
 
K

Kim14

Not sure if this is the part of the code needed, but I am trying...



<HEAD><meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">

<script>
<!--
function land(ref, target)
{
lowtarget=target.toLowerCase();
if (lowtarget=="_self") {window.location=loc;}
else {if (lowtarget=="_top") {top.location=loc;}
else {if (lowtarget=="_blank") {window.open(loc);}
else {if (lowtarget=="_parent") {parent.location=loc;}
else {parent.frames[target].location=loc;};
}}}
}
function jump(menu)
{
ref=menu.choice.options[menu.choice.selectedIndex].value;
splitc=ref.lastIndexOf("*");
target="";
if (splitc!=-1)
{loc=ref.substring(0,splitc);
target=ref.substring(splitc+1,1000);}
else {loc=ref; target="_self";};
if (ref != "") {land(loc,target);}
}
//-->
</script>


------
<tr>
<td>
<div align="center"></div><font face="tahoma" size="2"><font
color="#ccff00"><div align="center">Dowloadable
Forms</div></font></font></a>
</div>
<div align="center">
<form action="dummy" method="post"><select name="choice" size="1"
onChange="jump(this.form)"><option
value="http://www.idph.state.ia.us/common/pdf/vital_records/application_certified_copy_vital_record.pdf">Birth/Death/Marriage
Request</option>
<option value="marriage_app.pdf">Marriage Application</option><option
value="http://travel.state.gov/pdf/DS-0011.pdf">Passport
Application</option><option
value="http://www.archives.gov/research_room/obtain_copies/standard_form_180.pdf">Veteran's
Record Request Form</option><option value="dov.pdf">Declaration of
Value- must use 8 1/2" x 14 paper</option>
<option value="ground.pdf">Groundwater Hazard
Statement</option></select></form>
</div>
</td>
</tr>
 
R

RobB

Kim14 said:
Not sure if this is the part of the code needed, but I am trying...



<HEAD><meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">

<script>
<!--
function land(ref, target)
{
lowtarget=target.toLowerCase();
if (lowtarget=="_self") {window.location=loc;}
else {if (lowtarget=="_top") {top.location=loc;}
else {if (lowtarget=="_blank") {window.open(loc);}
else {if (lowtarget=="_parent") {parent.location=loc;}
else {parent.frames[target].location=loc;};
}}}
}
function jump(menu)
{
ref=menu.choice.options[menu.choice.selectedIndex].value;
splitc=ref.lastIndexOf("*");
target="";
if (splitc!=-1)
{loc=ref.substring(0,splitc);
target=ref.substring(splitc+1,1000);}
else {loc=ref; target="_self";};
if (ref != "") {land(loc,target);}
}
//-->
</script>


------
<tr>
<td>
<div align="center"></div><font face="tahoma" size="2"><font
color="#ccff00"><div align="center">Dowloadable
Forms</div></font></font></a>
</div>
<div align="center">
<form action="dummy" method="post"><select name="choice" size="1"
onChange="jump(this.form)"><option
value="http://www.idph.state.ia.us/common/pdf/vital_records/application_certified_copy_vital_record.pdf">Birth/Death/Marriage
Request</option>
<option value="marriage_app.pdf">Marriage Application</option><option
value="http://travel.state.gov/pdf/DS-0011.pdf">Passport
Application</option><option
value="http://www.archives.gov/research_room/obtain_copies/standard_form_180.pdf">Veteran's
Record Request Form</option><option value="dov.pdf">Declaration of
Value- must use 8 1/2" x 14 paper</option>
<option value="ground.pdf">Groundwater Hazard
Statement</option></select></form>
</div>
</td>
</tr>

You're not doing anything wrong - it's those .pdf files that are
causing the problem (try this in another browser - like Mozilla Firefox
- to see). Found this:

http://support.microsoft.com/?kbid=305836

....which might be related. Not sure of the fix, if there is one. I'll
toss this one back in the air /:eek:)

Sorry I couldn't have been more helpful.
http://www.mozilla.org/products/firefox/
 
K

Kim14

RobB-

Thank you so much for your efforts! I read the microsoft support page
and it sure sounds like my problem, as all my other links work fine on
opening. I have been working on this page in IE and Mozilla and get
the same results. It just gives me some relief to think I'm not just
losing my mind- I will now stop beating my head against the wall on
this issue.

Like I said, I can't thank you enough for your help!!!
 
K

Kim14

Just came up with another interesting problem. My first drop-down list
contains pdf files, but my 3rd drop-down contains URL's. The URL's
also open in their own page.

All of my drop-downs are on the same page, so the head of my document
would be the same as my earlier post. Here are the specifics on the
drop-down with URL's.

If this is the case, maybe the earlier conclusion was not my problem?

<tr>
<td>
<div align="center"></div><font face="tahoma" size="2"><font
color="#ccff00"><div align="center">Realtors</div></font></font></a>
</div>
<div align="center"><form action="dummy" method="post"><select
name="choice" size="1" onChange="jump(this.form)"><option
value="http://www.abensrealty.com">Abens Realty</option><option
value="http://www.rodandtrudy.com">Farmers National
Company</option><option value="(e-mail address removed)">J/C Wells Real
Estate</option><option value="http://jimfortunerealty.com/">Jim Fortune
Realty</option><option value="http://www.kingrealtywc.com/">King
Realty</option><option
value="http://www.webstercityrealestate.com/">Webster City Real
Estate</option></select></form>
</td>
</tr>
</tr>
 
R

RobB

Kim14 said:
Just came up with another interesting problem. My first drop-down list
contains pdf files, but my 3rd drop-down contains URL's. The URL's
also open in their own page.

All of my drop-downs are on the same page, so the head of my document
would be the same as my earlier post. Here are the specifics on the
drop-down with URL's.

If this is the case, maybe the earlier conclusion was not my problem?

<tr>
<td>
<div align="center"></div><font face="tahoma" size="2"><font
color="#ccff00"><div align="center">Realtors</div></font></font></a>
</div>
<div align="center"><form action="dummy" method="post"><select
name="choice" size="1" onChange="jump(this.form)"><option
value="http://www.abensrealty.com">Abens Realty</option><option
value="http://www.rodandtrudy.com">Farmers National
Company</option><option value="(e-mail address removed)">J/C Wells Real
Estate</option><option value="http://jimfortunerealty.com/">Jim Fortune
Realty</option><option value="http://www.kingrealtywc.com/">King
Realty</option><option
value="http://www.webstercityrealestate.com/">Webster City Real
Estate</option></select></form>
</td>
</tr>
</tr>

Sorry for the delay. Couldn't reproduce your problem; does seem to be a
..pdf related issue. Setting the Location object (window.location) to a
new url is pretty basic browser programming. btw if you're not
targeting any of those urls to anything but the same, non-framed
window, you don't need all that rigmarole:

function jump(obj, url)
{
if (obj &&
(url = obj.options[obj.selectedIndex].value))
top.location = url;
}

....and:

<select name="choice" size="1" onchange="jump(this)">
....should do the trick.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top