nearlynewbie - whats wrong here

P

please-answer-here

done 100's of this before and have been sterring and sterring at the code

response.write( "<form name=""fundneordrer"" action=""scandia.asp""
method=""POST"" onSubmit=""return chk_sel_ordre();""> ")
response.write("<input type=""submit"" name=""hentordre"" value=""vis
ordre"">")



WHY is it that chk_sel_ordre never gets executed?
 
J

Jc

please-answer-here said:
done 100's of this before and have been sterring and sterring at the code

response.write( "<form name=""fundneordrer"" action=""scandia.asp""
method=""POST"" onSubmit=""return chk_sel_ordre();""> ")
response.write("<input type=""submit"" name=""hentordre"" value=""vis
ordre"">")



WHY is it that chk_sel_ordre never gets executed?

Looks like you're missing the closing form tag, assuming doubling up
quotes is a valid technique for escaping quote characters in what I
assume is VB code.
 
P

please-answer-here

Jc said:
Looks like you're missing the closing form tag,

Noop. the code above was snipped to exclude all the input/select details,
but the said:
assuming doubling up quotes is a valid technique for escaping quote
characters in what I
assume is VB code.

Yes is actually a asp file with VB scripts
 
H

Hywel Jenkins

done 100's of this before and have been sterring and sterring at the code

response.write( "<form name=""fundneordrer"" action=""scandia.asp""
method=""POST"" onSubmit=""return chk_sel_ordre();""> ")
response.write("<input type=""submit"" name=""hentordre"" value=""vis
ordre"">")



WHY is it that chk_sel_ordre never gets executed?

Why not post a URL to the actual code, including the pertinent code,
rather than a small snippet of the ASP?
 
K

Kimmo Laine

please-answer-here said:
Noop. the code above was snipped to exclude all the input/select details,


Yes is actually a asp file with VB scripts


Instead of showing the asp source code, could you post what it generates?
Also, you didn't mention a) if the form is submitted (so that the function
is just not executed) or does the submitting fail also and b) can you launch
the function by other methods, for example <a href="#" onClick="return
chk_sel_ordre();">Launch it</a>.
 
E

Evertjan.

please-answer-here wrote on 18 jun 2005 in comp.lang.javascript:
Noop. the code above was snipped to exclude all the input/select


Yes is actually a asp file with VB scripts

[ASP-]VB code is OT in this Javascript NG!

However, try this, for the same ASP result ASP-language independent:

%>
<form name='fundneordrer' action='scandia.asp'
method='POST' onSubmit='return chk_sel_ordre();'>
<input type='submit' name='hentordre' value='vis ordre'>
<%
 
P

please-answer-here

Hywel said:
Why not post a URL to the actual code, including the pertinent code,
rather than a small snippet of the ASP?

got your point, but is was meant to be easier than look at 100 lines of
code, which was irrelevant to the problem.

- http:90eren.homeip.net/test
- click "søgning"
- click "find ordre"
show source (the code is near the end)
 
P

please-answer-here

Kimmo said:
Instead of showing the asp source code, could you post what it
generates? Also, you didn't mention a) if the form is submitted (so
that the function is just not executed) or does the submitting fail
also and b) can you launch the function by other methods, for example
<a href="#" onClick="return chk_sel_ordre();">Launch it</a>.

a) Yes the form is submitted (which is a problem, since I only wants to
submit when the user have made a selection)
b) No
c) Yes; without a problem
 
P

please-answer-here

Kimmo said:
Instead of showing the asp source code, could you post what it
generates? Also, you didn't mention a) if the form is submitted (so
that the function is just not executed) or does the submitting fail
also and b) can you launch the function by other methods, for example
<a href="#" onClick="return chk_sel_ordre();">Launch it</a>.

a) Yes the form is submitted without a problem (which IS the problem, since
I only wants to submit when an item has been selected)
b) No
c) Yes without any problems
 
P

please-answer-here

Evertjan. said:
please-answer-here wrote on 18 jun 2005 in comp.lang.javascript:
Noop. the code above was snipped to exclude all the input/select


Yes is actually a asp file with VB scripts

[ASP-]VB code is OT in this Javascript NG!

I know, but the problem is NOT the asp/vbscript code. the problem is the
Javascript
 
K

Kimmo Laine

please-answer-here said:
a) Yes the form is submitted without a problem (which IS the problem,
since I only wants to submit when an item has been selected)
b) No
c) Yes without any problems

Still waiting to see the output code instead of the asp source. Then I could
give some answers concerning the problem...
 
K

Kimmo Laine

Kimmo Laine said:
Still waiting to see the output code instead of the asp source. Then I
could give some answers concerning the problem...


Sorry, I didn't notice yo posted the link already.

I guess you could try going back to basics. Try two things:
instead of calling the function in onsubmit, call something simple, like
alert("foobar"); If that works, adjust the function. Insert in the beginning
of the function alert("foobar");
return false;

And if you've seen "foobar" alert box on both times, there might be
something funny in the rest of the function...
For example this:
if (statusfelt == 2 ) {
return true;
}
The execution stops right here every time and returns true, if you call it
with parameter 2... What was the meaning of it, I wonder...
 
V

VK

Nothing wrong with your script. You simply missed the closing </form>
tag for the first form (you have two on this page). Put it in the place
of your choice and be happy ;-)
 
R

Richard Cornford

please-answer-here said:
Evertjan. wrote:
Yes is actually a asp file with VB scripts

[ASP-]VB code is OT in this Javascript NG!

I know, but the problem is NOT the asp/vbscript code.
the problem is the Javascript
<snip>

Which is the point. If the problem is the client-side code then it is
the client-side code that needs looking at, not the code that creates
it.

Everyone here knows how to interpret client-side code, only the ASP-VB
programmers here will be confident about the behaviour of your
server-side code. Plus, if you don't look at what your server side code
actually outputs how can you be certain that the errors are client-side.

Richard.
 
P

please-answer-here

Richard said:
Which is the point. If the problem is the client-side code then it is
the client-side code that needs looking at, not the code that creates
it.

Everyone here knows how to interpret client-side code, only the ASP-VB
programmers here will be confident about the behaviour of your
server-side code. Plus, if you don't look at what your server side
code actually outputs how can you be certain that the errors are
client-side.

Richard.

point taken !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top