Javascript Help

Results 1 to 3 of 3

Thread: Javascript Help

  1. #1
    prakash Guest

    Default Javascript Help

    I want to check a condition...if meets then take them to one page else to ánother that I have used..<BR>any suggestions<BR><BR> var article="";<BR> function loadarticle(articlename) {<BR> parent.parent.main.location.href=articlename;<BR> <BR> if (articlename.indexOf(&#039;.doc&#039;)&#062;0) {<BR> article=articlename;<BR> } else {<BR> article = "";<BR> }<BR> }<BR> <BR> function showdocument(documentid) {<BR> document.location.href="showdocument.asp?documenti d=" + documentid;<BR> <BR> }<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Javascript Help

    Using client-side JavaScript?<BR><BR>I don&#039;t understand your problem...<BR><BR>function showDocument()<BR> if(articleName.indexOf(".doc")&#062;0){<BR> gotoURL = "showdocument.asp?documentid=" + articleName;<BR> }else{<BR> gotoURL = "anotherpage.asp";<BR> }<BR> document.location.href = gotoURL;<BR>}<BR><BR>If you want to use an ASP variable then it&#039;s slightly more tricky. Just remember the client-server model though and you shouldn&#039;t run into too many problems.<BR><BR>Craig.

  3. #3
    prakash Guest

    Default I am so vexed...

    Well all I need is if this does not satisifies one of the fields in document table...I want that particular link to another page...than the usual ones...

Posting Permissions

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