Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JavaScript Forms

Status
Not open for further replies.

Scalnan

Programmer
Joined
Aug 16, 1999
Messages
1
Location
US
Hello, all.<br>
<br>
I would like to use <A HREF=" TARGET="_new"> hierarchical menus code (below) to generate form output (preferably e-mailable). Specifically, I would like it to operate as sort of a shopping cart- each menu item leading to categorized products which could be put into an array of all selected products. Is this possible? I'm a JavaScript newbie in the strongest sense.<br>
<br>
Here's the code. (hierArrays.js and hierMenus.js are not included. Are they necessary to answer my question?)<br>
<br>
&lt;html&gt;<br>
&lt;head&gt;<br>
&lt;title&gt;<br>
Heirarchical Menus<br>
&lt;/title&gt;<br>
&lt;SCRIPT LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;text/javascript&quot;&gt;&lt;!--<br>
NS4 = (document.layers); IE4 = (document.all); ver4 = (NS4 ¦¦ IE4); <br>
isMac = (navigator.appVersion.indexOf(&quot;Mac&quot;) != -1);<br>
isMenu = (NS4 ¦¦ (IE4 && !isMac));function popUp(){return};<br>
function popDown(){return};if (!ver4) event = null;//--&gt;&lt;/SCRIPT&gt;<br>
<br>
<br>
&lt;SCRIPT LANGUAGE=&quot;JavaScript1.2&quot; TYPE=&quot;text/javascript&quot;&gt;<br>
&lt;!--<br>
<br>
if (isMenu) {<br>
menuVersion = 3;<br>
<br>
menuWidth = 120;<br>
childOverlap = 50;<br>
childOffset = 5;<br>
perCentOver = null;<br>
secondsVisible = .5;<br>
<br>
fntCol = &quot;blue&quot;;<br>
fntSiz = &quot;10&quot;;<br>
fntBold = false;<br>
fntItal = false;<br>
fntFam = &quot;sans-serif&quot;;<br>
<br>
backCol = &quot;#DDDDDD&quot;;<br>
overCol = &quot;#FFCCCC&quot;;<br>
overFnt = &quot;purple&quot;;<br>
<br>
borWid = 2;<br>
borCol = &quot;black&quot;;<br>
borSty = &quot;solid&quot;;<br>
itemPad = 3;<br>
<br>
imgSrc = &quot;<A HREF=" TARGET="_new"> imgSiz = 10;<br>
<br>
separator = 1;<br>
separatorCol = &quot;red&quot;;<br>
<br>
isFrames = false; // &lt;-- IMPORTANT for full window<br>
navFrLoc = &quot;left&quot;; // &lt;-- display. see below<br>
<br>
keepHilite = true; <br>
NSfontOver = true;<br>
clickStart = true;<br>
clickKill = true;<br>
}<br>
<br>
//--&gt;<br>
&lt;/SCRIPT&gt;<br>
<br>
<br>
&lt;script language=&quot;JavaScript1.2&quot; type=&quot;text/javascript&quot;&gt;<br>
&lt;!--<br>
if(isMenu) {<br>
document.write(&quot;&lt;SCRIPT LANGUAGE='JavaScript1.2' SRC='hierArrays.js'&gt;&lt;\/SCRIPT&gt;&quot;);<br>
document.write(&quot;&lt;SCRIPT LANGUAGE='JavaScript1.2' SRC='hierMenus.js'&gt;&lt;\/SCRIPT&gt;&quot;);<br>
}<br>
//--&gt;<br>
&lt;/script&gt;<br>
&lt;/head&gt;<br>
&lt;body&gt;<br>
&lt;A HREF=&quot;/&quot; onMouseOver=&quot;popUp('elMenu1',event)&quot;<br>
onMouseOut=&quot;popDown('elMenu1')&quot;&gt;Webreference&lt;/A&gt;&lt;A HREF=&quot;/index2.html&quot;<br>
onMouseOver=&quot;popUp('elMenu2',event)&quot;<br>
onMouseOut=&quot;popDown('elMenu2')&quot;&gt;Contents&lt;/A&gt;<br>
&lt;/body&gt;<br>
&lt;/html&gt;<br>
 
hmm could couple the links from the furthest-out options to a JS &quot;shopping-cart&quot; then have the shopping cart be a form with a mailto: action & name the text box where all their items are dumped &quot;body&quot;. Use an &quot;invisible&quot; input that's set to some distinguishing phrase (i.e. Submission of items requested) named &quot;subject&quot; to give the e-mail submission message that subject.<br>
<br>
<br>
hope that helps <p>-Robherc<br><a href=mailto:robherc@netzero.net>robherc@netzero.net</a><br><a href= > </a><br>*nix installation & program collector/reseller. Contact me if you think you've got one that I don't :-)
 
I have created a couple of .js files for a hiermenu nav. In the hiermenus.js, I have onLoad = startIt...but I keep getting an error, requesting that isFrames is undefined?

I am still a beginner, so I need a lot of help.

My end result is, using Dreamweaver, created a navigation that works off of the mouseover button and a menu slides down. Anyone know what I'me talking about?
 
I can't help much but I do have a tutorial link that may be of some help. I know it's helped me alot! They have basic HTML all the way through to DHTML/JavaScript. Up to webmaster. Good luck
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top