Results 1 to 6 of 6

Thread: what is the diffecnt bettween this two code?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2009
    Posts
    340

    what is the diffecnt bettween this two code?

    hi, i am stuck with following problem.. :

    JS1 is the source code/script. and i changed it two JS2, but JS1 works perfectly while JS2 Not, please any one help me out and let me know what is the difference/error between them :

    JS1:
    Code:
    if ( app.viewerVersion >= 7 ) 
    { 
     var nButton = app.alert({
     cMsg: "Hi,\nThanks a lot to use/read this .. \n\nPlease Make A Paypal Donation to continue to read this ...!!",
     cTitle: "Thanks",
     nIcon: 1,
     nType: 2
     });
    
     switch (nButton)
     {
       case 3: //No
        this.closeDoc();    
        break;
       case 4: //Yes
        app.launchURL("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QK5JCSNZ2HZUU", true);
        break;
     };
    }
    JS2:
    Code:
    if ( app.viewerVersion >= 7 )
    {
     var nButton = app.alert({
     cMsg: "Would you like to vist my website?",
     cTitle: "Hello?",
     nIcon: 1,
     nType: 2
     });
    
     Switch (nButton)
     {
       case 3: //No
        this.closeDoc();
        break;
       case 4: //Yes
        app.launchURL("www.siamcomputer-jsr.com", true);
        break;
     };
    }
    best regards
    kamrul hassan

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: what is the diffecnt bettween this two code?

    The only difference I notice between the two above codes is that the URL has been changed in the second version. Do you receive any errors? If so what errors do you receive?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2009
    Posts
    340

    Re: what is the diffecnt bettween this two code?

    Quote Originally Posted by Nightwalker83 View Post
    The only difference I notice between the two above codes is that the URL has been changed in the second version. Do you receive any errors? If so what errors do you receive?
    nope.. sir, that's not the deference.. bcoz, url is in "" (qutoe) value (string value) i don't think that is the problem, by the way,, it give me "syntax error"

    that's why i am confused too, as i looked both code letter by letter but didn't fine any reasonable change/difference..

    please some one help me out..

    best regards
    kamrul hassan

  4. #4
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: what is the diffecnt bettween this two code?

    Post the exact error you receive!
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  5. #5
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: what is the diffecnt bettween this two code?

    hmm.. try removing the semicolon at the end of switch block.


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  6. #6
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: what is the diffecnt bettween this two code?

    You made the switch command have an uppercase S?

    Make it switch (nButton) instead of Switch (nButton)?

    Also, I'm guessing this is Javascript and not Java, so I'll move it to the appropriate forum!


    Has someone helped you? Then you can Rate their helpful post.

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