i have 2 buttons inside my form, next and previous
next submits the form and previous goes back to the previuos page, this works fine in IE
in firefox the previuos button actually submits the form aswell when it should redirect to the previuos page
any ideas what i can do?
<button...
ok thanks, got it working
just last thing i have 2 buttons inside my form
next and previous
next submits the form and previous goes back to the previuos page, this works fine in IE
in firefox the previuos button actually submits the form aswell when it should redirect to the previuos page...
ok thanks i have installed firebug where do i go to debug javascript?
also just wondering if you know why the button below would be subitting the form in firefox?
it works fine in IE
<button class="NavButtons" onClick="window.location='ModuleQuestions.asp?ques=<% Response.Write prevpag...
ok i have it working after lots of playing around.
now back to the orginal function below, which i have changed slightly by adding another form element and using that to compair the qtext value.
but it is not validating the form even if it qtext is empty?
function TextType() {
var qText...
yes thats exactly what i tried to do in the first place but then anything below that code does not get diplayed on my page, but i thought that would work?
ok yes i understand that, the only issue is
onsubmit="return ValValue();"
will not work as i need to use the reponse write function.
<% Response.Write ValValue %>
but this causes a issue, so how can can i display the function from the database?
i dont understand
if i have a function called formcheck
you would use onsubmit="return formcheck();"
so what i am trying to do is have
onsubmit="return "ValValue"();" and the ValValue will be formcheck in the database.
if this cant work, what else could i do?
ok i just thought can i have a different form on each page which i then can use static functions.
but then i have a server include with my submit button on.
so how can i submit the form from my include, would a onclick submit event work?
yes but as i was saying the value "ValValue" will change dyamically from my database, depending what page is being displayed, the "ValValue" will equal the name of the function.
so in my table i will have a column called functions with a list of the functions and a content column with my html...
Hi Dan
thanks for yuor help, just need to know if what i surgest is a good way of doing it, if so i will play around with it.
so..
have my 4 different javascript functions, then call then using my new variable. would this be a good way?
so if i set a variable called ValValue which equals what i have in my database ie the function name (TextType)
then jsut use that variable in the form?
so it would be
<form name="form1" method="post" onsubmit="return ('ValValue');">
i have 10 dynamic pages with 4 differnt types of form elements each requires a different validation
so can i have the onsubmit pointing to a function, then in that function can i specify the 4 different validations
but then how would i know which validation is required?
well it works when i use it as a onclick event, all the serverside code does is pull the name of the javascript function, which has to change depending on what is displayed.
so
<form name="form1" method="post" action="ModuleQuestions.asp?ques=<% Response.Write nextpag %>"onSubmit="return <%...
ok when i add the on submit code like below, my asp main content does not get displayed, i cant see why
<form name="form1" method="post" action="ModuleQuestions.asp?ques=<% Response.Write nextpag %>"onSubmit="return <% Response.Write QuesQuery("ValidateID") %>();">
Hi thanks,
i can not make the "onclick" to "onsubmit" as my form is dynamic and changes this needs to be button onclick.
what could i do to use the onclick
Hi i have a form below, i have some javascript to validate if the text box is empty.
what i need to do is
if the text box "qtext" is empty show alert
if the text box "qtext" is not empty and the value = 8 then update the value of the form element "answer" to "1"
then submit the form
else...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.