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 November 16th, 2003, 02:28 AM
FordGT90Concept FordGT90Concept is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Area 5.1, Mars
Posts: 31 FordGT90Concept User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 28 m 17 sec
Reputation Power: 10
Question Need assistance with incorperating HTML and Email/forms into JavaScript

You can see what I am working on at www.freewebs.com/demogovclan/. The problem I am encountering is that the navigational bar on the upper frame was downloaded and now I am seeing that it really wasn't made for frames. In the JavaScript, it asks for an address but because I want it to display in the second frame, I need it to target it. It will have to work in the "url" section below. This is taken from a JS file:

// add main link item ("url","Link name",width,"text-alignment","_target","alt text",top position,left position,"key trigger")
addMainItem("www.freewebs.com/demogovclan/home.html","<span class='u'>H</span>ome",128,"center","","",0,0,"h");

The URL part is where I am having difficulites. I found this by browsing the web: "javascript:top.frames['framename'].location='filename.html';return true".

I tried this and it doesn't load the page and only gives me a error down in the IE status bar. I know I have the framename and file name right but the top.frames is what I think is throughing it off. Please help if you can.



A little side note. I need to create of form that has a bunch of fields (first name, screenname, age, sex, email, comments) that will write it to an email and send it to me that way. I've searched the web and really haven't come up with anything useful for this.

I'm also searching for something for the same script as above that will open your email composer with the email address already in the "to" field. It needs to also work in the URL type fashion in JavaScript. I've tried a mailto and just the email address and it comes up with an error that the page cannot be found. It will have to work in the "url" section below. This is taken from a JS file:

// add child menu link items ("url","Link name","_target","alt text")
addChildmenuItem("http://www.nbc.com","NBC","","");

Thanks in advance

Last edited by FordGT90Concept : November 16th, 2003 at 02:30 AM.

Reply With Quote
  #2  
Old November 17th, 2003, 08:46 AM
melsana's Avatar
melsana melsana is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: MD
Posts: 373 melsana User rank is Corporal (100 - 500 Reputation Level)melsana User rank is Corporal (100 - 500 Reputation Level)melsana User rank is Corporal (100 - 500 Reputation Level)melsana User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 11
Send a message via AIM to melsana
I'll preface with the fact that I have never really done much with frames and javascript but I got this out of my javascript book and thought it might help.

frames is an property of the window object.

The frame object contains the following properties
frames (an array of objects for each frame in a window. Frames appear in the order in which they appear in the HTML source code.)
parent (a string indicating the name of the window conaining the frameset)
self (an alternative for the name of the current window)
top (an alternative for the name of the topmost window)
window( an alternative for the name of the current window)


Because of this I think you should change your code to one of the following... since I havn't tested this myself I'm not sure which one will work...

1. window.frames.top.location
2. window.frames[0].location (assuming 0 is the topmost frame)
3. window.top.location
4. window.frames.frames[0].location

I've put them in the order of most likely to work to least likely to work.

You probobably wont need to have the "window" included (except possibly will be needed in option 3)

Hopefully this will help.

As far as the e-mail section... I would only know how to do this if you have access to perl/cgi.

Last edited by melsana : November 17th, 2003 at 08:49 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Need assistance with incorperating HTML and Email/forms into 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