|
-
Jan 29th, 2001, 03:09 PM
#1
Thread Starter
Frenzied Member
i went thru my code like 30 times, doiing all sort of test,
and i can't fing the bobo.
here is my code
Code:
...
strsql = "INSERT INTO tblPlayer (playerId,playerClubId,playerName,playerLastName,playerGroupID" _
& ") VALUES('" & newId & "',1,'" & request("firstname") &"', '"& request("lastname") & "',7)"
'set rs=conn.execute(strsql)
populateArrayCGM
%><Script language=javascript>
var nname;
var nn;
nn=document.info.infoNum.value;
nname=document.info.firstName.value + ', ' + document.info.lastName.value;
eval("opener.document.settime.Player" + nn + ".value='" + nname + "';");
eval("opener.document.settime.Id" + nn + ".value='<%=newId%>';");
window.close();
</Script>
<%
End if
%>
there is more before the ..., but it is not important for now!
everything after:
nn=document.info.infoNum.value;
does not execute,WHY
What is the problemo!!!
-
Jan 30th, 2001, 04:08 AM
#2
Fanatic Member
Hi sebs
Two things
One - is your playerId column a string, as if it isn't, take away the single pip's for the values part.
two - are you trying to run this through PWS or IIS ?
as PWS doesn't allow you to embed asp inside script tags whereas IIS does
If it is neither of these, give us a shout and say where and what the error is
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Jan 30th, 2001, 08:03 AM
#3
Thread Starter
Frenzied Member
no....
it only this that does not work:
Code:
%><Script language=javascript>
var nname;
var nn;
nn=document.info.infoNum.value;
nname=document.info.firstName.value + ', ' + document.info.lastName.value;
eval("opener.document.settime.Player" + nn + ".value='" + nname + "';");
eval("opener.document.settime.Id" + nn + ".value='<%=newId%>';");
window.close();
</Script>
<%
everything after
nn=document.info.infoNum.value;
does not work, my window does not close!if i put
an alert box before nn=document....
and one after, only the first one that will pop up!!
-
Jan 30th, 2001, 08:14 AM
#4
Fanatic Member
Does it just do nothing or does it come up with an error message? As I can't see anything wrong with that aprt from the imbedded asp which I explained in my last post.
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Jan 30th, 2001, 08:17 AM
#5
Thread Starter
Frenzied Member
nope, no error message,it look like my page reload though!
i have two text box and one of them clear after i hit the submit!
i really don't know what is wrong!!
tx for the help!!
-
Jan 30th, 2001, 08:23 AM
#6
Fanatic Member
could you post your whole page please, as I have an idea but i need to c everything.
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Jan 30th, 2001, 08:25 AM
#7
Thread Starter
Frenzied Member
here you go, i attach it to this thread!
just rename it to .asp
-
Jan 30th, 2001, 08:38 AM
#8
Fanatic Member
Please correct me if i'm wrong
to me it looks like that top part of code (inside the if statement will never run. you open the page for first time and display's the field's, you then submit back onto itself and do the insert. From the code you gave me I you use sub as your value to check for and if I remember coreectly, the request.form will not pick up on that, try changing sub to <input type="hidden" value="Ok">, but still leaving the submit button there (get rid of the name and value part)
Give it a go
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Jan 30th, 2001, 08:46 AM
#9
Fanatic Member
i'm talking out of my back side. it does support the input submit. are you by chance viewing this in NS, If this is ina frameset it should work, but if your doing this with a new window then your trying to use the new window as modal and NS doesn't like modal at all.
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Jan 30th, 2001, 08:49 AM
#10
Thread Starter
Frenzied Member
for the first part, yes it work, you can submit a form on itself,
i do it for other page in my project!
for the second part,i don't really understand what you are
saying!
no, i both tried it in MSIE and NN both does the same thing!
and yes i open it in a new window,that wht the
opener.document........
-
Jan 30th, 2001, 08:57 AM
#11
Fanatic Member
sorry about that mate, I know you can submit back on itself, but i didn't know you could grab a value from a submit button, but I do know.
I think your problem is that you are trying to change value's of field's in a different browser window, and I haven't done anything like that before, so I can't help you with that one.
Sorry mate
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Jan 30th, 2001, 09:04 AM
#12
Thread Starter
Frenzied Member
i almost have it, now it's only my window that does not
close.
i attach it if you wanna see what i did!!
-
Jan 30th, 2001, 09:24 AM
#13
Thread Starter
Frenzied Member
YEEESSSS!!!, now it work ,finally,
don't you hated it when it's a small problem that should
be easy but yet yoou spend like 3-4 hour on it!!
I love programming!!
It so fun when you find the problem!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|