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 June 8th, 2001, 10:48 AM
Kev77 Kev77 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 44 Kev77 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
javascript

HELP

I have a web page with 3 frames on a page. I am moving information from one frame to other using java script. An example of the line i am using is:

parent.selectsquad.SelectSquad.goalkeeper1_id.value=play;

selectsquad is the frame name
SelectSquad is the form name

When in ie 5 I have no problems the value of play moves across to the text box goalkeeper1_id no problem. However when I run the same page in netscape navigatopr 4.7 I get the following error message :

parent.selectsquad.SelectSquad has no properties.

Do I access the frame diffently in netscape?

Kev

Reply With Quote
  #2  
Old June 8th, 2001, 02:47 PM
mcandelo mcandelo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Boston, MA
Posts: 6 mcandelo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cool debug your script

Try using alerts to figure out where your objects are.

var myframe = parent.selectsquad;
var myform = parent.selectsquad.SelectSquad;

alert('frame: ' + myframe + '\nform: ' + myform);

I think you've got the frame identified, but I'll bet there's something wrong with the way your addressing the form. Maybe it hasn't been created yet.

Also, try using the frames[], forms[], and elements[] arrays to get at the object. Try testing them by returning the length of each.

Reply With Quote
  #3  
Old June 8th, 2001, 02:49 PM
bbjeff bbjeff is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Location: Münster (Germany)
Posts: 44 bbjeff User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
If parent.selectsquad.SelectSquad.goalkeeper1_id is a selectbox you have to use this to make it work in both browsers:

parent.selectsquad.SelectSquad.goalkeeper1_id[parent.selectsquad.SelectSquad.goalkeeper1_id.selected].value

I think IE automatically knows that you want to know the value of the selected item of the selectbox, but somehow NN does not.

Maybe this was not your problem?

Reply With Quote
  #4  
Old June 8th, 2001, 03:58 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
parent.selectsquad.document.SelectSquad.goalkeeper1_id.value=play;

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > javascript

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