Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all,
Vanilla are planning an update to the site on April 24th (next Wednesday). It is a major PHP8 update which is expected to boost performance across the site. The site will be down from 7pm and it is expected to take about an hour to complete. We appreciate your patience during the update.
Thanks all.

using prototype with asp.net

  • 04-04-2007 9:37pm
    #1
    Registered Users Posts: 872 ✭✭✭


    Hi,

    I have heard great things about prototype so im trying to use it with a basic asp.net page:
    [B]HTML[/B]
    <a href="javascript:doAjax()">Link</a>
    
    [B]JS[/B]
    
    function doAjax(){
     new Ajax.Request('default.aspx?id=1', {   method: 'get',   parameters: {}   }); 
    }
    

    I thought the above would call default.aspx?id=1 and do what i want it to do when this url is requested but nothing is happening.

    Any ideas what im doing wrong ?

    Thanks


Comments

  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    Can you post the code behind for default.aspx?


  • Registered Users Posts: 872 ✭✭✭grahamor


    it's just

    page_load
    {

    if(!IsPostBack)
    {
    //do stuff
    }

    if(Request["id"] == "1")
    {
    Response.Write("Ajax Called"); // this is meant to write out when the ajax.request is called in the javascript.
    }

    }

    i know i'm missing something very simple, i just dont know what it is...


  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    HTML
    <a href="javascript:doAjax()">Link</a>

    JS

    function doAjax(){
    new Ajax.Request('http://www.yourserver.com/default.aspx?id=1', { method: 'get', parameters: {} });
    }

    I don't have time to really look at it but I'd hazard a guess and say that the default.aspx url isn't fully qualified. It is in the code above, try that.


Advertisement