Ask a Question related to Dreamweaver AppDev, Design and Development.
-
Timothy Robertson #1
Form List problem with Javascript
I have a list that is being generated dynamically from my MS SQL
database. It basically lists a series of events in the database as the
labels and has there ID numbers as the value.
I want it so that when an event is clicked that a eventdetail page will be
opened in a seperate frame, passing the selected event's ID number through
the URL.
I think I need to use Javascript, but when I use the behavoir function in
Dreamweaver it does nothing.
Any suggestions?
my code is below:
(My page is in ASP VBscript)
<select name="select" size="20" class="dropdown" id="el01"
onChange="MM_goToURL('tdetails','tour_details2.asp ?tid=<%=(rs_tourdates.Fields.Item("tourid").Value) %>">
<%
While (NOT rs_tourdates.EOF)
%>
<option value="<%=(rs_tourdates.Fields.Item("tourid").Valu e)%>"><%=
DoDateTime((rs_tourdates.Fields.Item("tourdate").V alue), 2, 2057) %> -
<%=(rs_tourdates.Fields.Item("tourtitle").Value) %> -
<%=(rs_tourdates.Fields.Item("tourlocation").Value )%></option>
<%
rs_tourdates.MoveNext()
Wend
If (rs_tourdates.CursorType > 0) Then
rs_tourdates.MoveFirst
Else
rs_tourdates.Requery
End If
%>
</select>
And above in the code, Dreamweaver generated this Javascript:
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
Timothy Robertson Guest
-
How do I create form fields like buttons,list box and associate JavaScript with thosefields?
IS it possible to create form fields like buttons, list box using PDFL SDK? How do I associate JavaScript with these form fields and also on document... -
Searching a column containing a list against a form list
I have a form that allows users to select multiple items from a list. form.hobbies = 1,5,3,6,8,2 (from a table pullup) I want to be able to... -
JavaScript: html list items within list items?
Hi, I've seen how to implement a JavaScript to change the CSS class of every other list item in an unordered list, but, being new to JavaScript,... -
List Menu, Javascript and Form Submit
I am using a list menu to perform two tasks. First, it toggles a show/hide area based on the selected value using javascript. The I use an insert... -
Problem: Javascript & PHP form with HTML_QuickForm
Hi, I have a problem with a form using the PHP PEAR HTML_QuickForm package & javascript: I want to record the content of my form into a mySQL... -
Timothy Robertson #2
Re: Form List problem with Javascript
I discovered that if I took the method="POST" action="" out of the form tags
then the javascript worked but only in safari, not in explorer. I double
checked and explorer does have javascript enabled, does anyone know where
the problem may lye?
On 4/5/05 4:29 PM, in article robertson-0504051629470001@localhost, "Timothy
Robertson" <robertson@m-2-design.com> wrote:
> I have a list that is being generated dynamically from my MS SQL
> database. It basically lists a series of events in the database as the
> labels and has there ID numbers as the value.
>
> I want it so that when an event is clicked that a eventdetail page will be
> opened in a seperate frame, passing the selected event's ID number through
> the URL.
>
> I think I need to use Javascript, but when I use the behavoir function in
> Dreamweaver it does nothing.
>
> Any suggestions?
> my code is below:
> (My page is in ASP VBscript)
>
> <select name="select" size="20" class="dropdown" id="el01"
> onChange="MM_goToURL('tdetails','tour_details2.asp ?tid=<%=(rs_tourdates.Fields
> .Item("tourid").Value)%>">
> <%
> While (NOT rs_tourdates.EOF)
> %>
> <option value="<%=(rs_tourdates.Fields.Item("tourid").Valu e)%>"><%=
> DoDateTime((rs_tourdates.Fields.Item("tourdate").V alue), 2, 2057) %> -
> <%=(rs_tourdates.Fields.Item("tourtitle").Value) %> -
> <%=(rs_tourdates.Fields.Item("tourlocation").Value )%></option>
> <%
> rs_tourdates.MoveNext()
> Wend
> If (rs_tourdates.CursorType > 0) Then
> rs_tourdates.MoveFirst
> Else
> rs_tourdates.Requery
> End If
> %>
> </select>
>
>
> And above in the code, Dreamweaver generated this Javascript:
> <script language="JavaScript" type="text/JavaScript">
> <!--
> function MM_goToURL() { //v3.0
> var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
> for (i=0; i<(args.length-1); i+=2)
> eval(args[i]+".location='"+args[i+1]+"'");
> }
> //-->
> </script>Timothy Robertson Guest



Reply With Quote

