Parameter Passing

Results 1 to 2 of 2

Thread: Parameter Passing

  1. #1
    Join Date
    Dec 1969

    Default Parameter Passing

    I&#039;ve got a function below which takes a number of parameters. There is also an e.g of calling the function <BR>which is giving me an invalid arguement error.<BR><BR><BR> function addChild(Page, Title, W, H) {<BR>"?ProjID=" lue, Title, "width=W,height=H,left=0,top=0,scrollbars=no");<BR > return false<BR> }<BR><BR>&#060;td width=150px bgcolor="lightblue" onclick="return addChild(&#039;Project.asp&#039;, &#039;Projects&#039;, 600, 325)"&#062;<BR><BR>Thanks in advance

  2. #2
    Join Date
    Dec 1969

    Default Tch! Just basic string manipulation!

    You did it right here:<BR> Page+"?ProjID="+document.frm1.txtID.value<BR>build ing up a string partly from literal text (stuff in quotes) and partly from variables.<BR><BR>How&#039;d you miss doing the same thing here:<BR> "width=W,height=H,left=0,top=0,scrollbars=no"<BR>< BR>Did you really think that a width of the letter W is legit???<BR><BR>How about:<BR> "width=" + W + ",height=" + H + ",left=0,top=0,scrollbars=no"<BR>???<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts