HighDots Forums  

Where's the code??

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Where's the code?? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ronald04
 
Posts: n/a

Default Where's the code?? - 08-03-2004 , 10:48 AM






I have a jumpmenugo and the corresponding javascript saved as a library item.
It includes the following after the list of options
<input type="button" name="Button1" value="Go"
onClick="MM_jumpMenuGo('menu1','parent',0)" class="jumpmenu">

When I preview it in a browser, all list values work.

However, when I insert the library item into a template, the onClick code
drops out as follows
<input type="button" name="Button1" value="Go" onClick="" class="jumpmenu">

How do I solve this?



Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Where's the code?? - 08-03-2004 , 10:51 AM






Why are you putting a Library item into a template?

Can you show me the code in the *.lbi file? Where in the template are you
inserting this library item?

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"ronald04" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I have a jumpmenugo and the corresponding javascript saved as a library
item.
It includes the following after the list of options
input type="button" name="Button1" value="Go"
onClick="MM_jumpMenuGo('menu1','parent',0)" class="jumpmenu"

When I preview it in a browser, all list values work.

However, when I insert the library item into a template, the onClick code
drops out as follows
input type="button" name="Button1" value="Go" onClick=""
class="jumpmenu"

How do I solve this?





Reply With Quote
  #3  
Old   
ronald04
 
Posts: n/a

Default Re: Where's the code?? - 08-03-2004 , 02:48 PM



I'm have the jump menu as a library item because it has frequent list value
updates and is used in several templates. The idea was to update the jump menu
once and subsequently update multiple templates. The onClick code disappears
when I try to insert the library item (with or without the js) into the body
tag.

<script language="JavaScript">
<!--


function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<script language="JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_jumpMenuGo(selName,targ,restore){ //v3.0
var selObj = MM_findObj(selName); if (selObj)
MM_jumpMenu(targ,selObj,restore);
}
//-->
</script>
<form name="form1" method="post" action="">
<table border="0" bgcolor="#FFFFFF" cellpadding="3" cellspacing="0">
<tr valign="bottom">
<td nowrap> <span class="dropthinheading">Journal Databases</span><br>
<select name="menu1" class="jumpmenu">
<option value="x" selected>For Articles on Your Topic</option>
<option value="x">All Databases</option>
snip
<option value="x">Academic Search</option>
<option>________________________</option>
</select>
<input type="button" name="Button1" value="Go"
onClick="MM_jumpMenuGo('menu1','parent',0)" class="jumpmenu">
</td></tr></table></form>


Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.