JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 16th, 2001, 08:43 AM
ericparker ericparker is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 27 ericparker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question redirect using javascript with target

I have two forms that users will need to complete.

I am using a frameset, the top frame has two check boxes. Depending on which checkbox is selected I want a different html page to load in the main frame.

Can anybody help me with using a target with :

window.location.href = 'FILE';

thanks

Reply With Quote
  #2  
Old May 16th, 2001, 07:09 PM
adios adios is offline
Senior Citizen
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2001
Location: leftcoast
Posts: 2,019 adios User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 15
It makes more sense to use radio buttons for this, since you should only have one selected at a time.

<html>
<head>
<title>untitled</title>
</head>
<body>
<form>
<input type="radio" name="goto" value="http://www.salon.com"
onclick="parent.frames[1].location.href=this.value">Salon
<br>
<input type="radio" name="goto" value="http://www.slate.com"
onclick="parent.frames[1].location.href=this.value">Slate
<br>
<input type="radio" name="goto" value="http://www.suck.com"
onclick="parent.frames[1].location.href=this.value">Suck
</form>
</body>
</html>

In your <frameset>, put the upper frame (frames[0]) first and the main frame (frames[1]) second. parent takes you up one level - so you can 'step' back down to a sibling frame.

Reply With Quote
  #3  
Old May 17th, 2001, 12:51 AM
ericparker ericparker is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 27 ericparker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thanks for your response

Thank you for your suggestion, a little while after I posted the thread I was able to solve my problem as usual, doing basically what you had suggested.

Thanks for the post.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > redirect using javascript with target

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap