Results 1 to 13 of 13

Thread: i really don't understand, i NEED some HELP!!

  1. #1

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    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!!!

  2. #2
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    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!

  3. #3

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    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!!


  4. #4
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    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!

  5. #5

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    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!!

  6. #6
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    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!

  7. #7

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    here you go, i attach it to this thread!

    just rename it to .asp

  8. #8
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    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!

  9. #9
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    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!

  10. #10

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    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........


  11. #11
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    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!

  12. #12

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    i almost have it, now it's only my window that does not
    close.

    i attach it if you wanna see what i did!!


  13. #13

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    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
  •  



Click Here to Expand Forum to Full Width