ASP Pages - Button and Check Box on click

Discussion in 'Software' started by alag20, Oct 25, 2006.

Thread Status:
Not open for further replies.
  1. alag20

    alag20 Private E-2

    Hi,
    I am trying to write a small asp page which contains a form of several checkbox and 2 buttons.

    I am trying to define the button as below.
    <input type="button" value="Hello!" language="VBScript" OnClick="VBButtonClicked()">



    I have a normal <% ..... %> for processing hearder etc in the code and then as
    below seperately

    <script language="VBScript">
    <!--

    sub VBButtonClicked()
    MsgBox("Hello!")
    End Sub

    ' -->
    </script>


    My problem is that it never seems that the OnClick is going to the function I asked it to. Whenever I click the button it says error on page in bottom left corner of the page. There is no error or anything before this.

    Please help urgent
     
  2. Kodo

    Kodo SNATCHSQUATCH

    you should NOT use VB script in any page. It is NOT cross browser compatible. I SUPER HIGHLY suggest you use javascript instead.


    <script language="javascript" type="text/javascript>
    function Button_Clicked(){
    alert("Hello");
    }
    </script>

    <input type="button" value="Hello!" OnClick="Button_Clicked()">
     
  3. alag20

    alag20 Private E-2



    Thank. I will use javascript for the same! However can you help me on my other checkbox post?
     
  4. goldfish

    goldfish Lt. Sushi.DC

  5. alag20

    alag20 Private E-2

    I have posted another thread with the kind of pic of what i want to do with it. I would be grateful if you could check that and advice accordingly.
     
Thread Status:
Not open for further replies.

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds