Results 1 to 9 of 9

Thread: [RESOLVED] Webforms - Call javascript function from server side and retrieve return value

  1. #1

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,373

    Resolved [RESOLVED] Webforms - Call javascript function from server side and retrieve return value

    I have a javascript function to retrieve all of the user inputted values in a table...

    Code:
    function getGrid1Values() {
        var gridArray = [
            [$('#Grid1_R1C1').text(), $('#Grid1_R1C2').text(), $('#Grid1_R1C3').text(), $('#Grid1_R1C4').text(), $('#Grid1_R1C5').text(), $('#Grid1_R1C6').text(), $('#Grid1_R1C7').text(), $('#Grid1_R1C8').text(), $('#Grid1_R1C9').text(), $('#Grid1_R1C10').text(), $('#Grid1_R1C11').text(), $('#Grid1_R1C12').text(), $('#Grid1_R1C13').text(), $('#Grid1_R1C14').text(), $('#Grid1_R1C15').text(), $('#Grid1_R1C16').text(), $('#Grid1_R1C17').text(), $('#Grid1_R1C18').text(), $('#Grid1_R1C19').text(), $('#Grid1_R1C20').text(), $('#Grid1_R1C21').text(), $('#Grid1_R1C22').text(), $('#Grid1_R1C23').text(), $('#Grid1_R1C24').text(), $('#Grid1_R1C25').text()],
            [$('#Grid1_R2C1').text(), $('#Grid1_R2C2').text(), $('#Grid1_R2C3').text(), $('#Grid1_R2C4').text(), $('#Grid1_R2C5').text(), $('#Grid1_R2C6').text(), $('#Grid1_R2C7').text(), $('#Grid1_R2C8').text(), $('#Grid1_R2C9').text(), $('#Grid1_R2C10').text(), $('#Grid1_R2C11').text(), $('#Grid1_R2C12').text(), $('#Grid1_R2C13').text(), $('#Grid1_R2C14').text(), $('#Grid1_R2C15').text(), $('#Grid1_R2C16').text(), $('#Grid1_R2C17').text(), $('#Grid1_R2C18').text(), $('#Grid1_R2C19').text(), $('#Grid1_R2C20').text(), $('#Grid1_R2C21').text(), $('#Grid1_R2C22').text(), $('#Grid1_R2C23').text(), $('#Grid1_R2C24').text(), $('#Grid1_R2C25').text()],
            [$('#Grid1_R3C1').text(), $('#Grid1_R3C2').text(), $('#Grid1_R3C3').text(), $('#Grid1_R3C4').text(), $('#Grid1_R3C5').text(), $('#Grid1_R3C6').text(), $('#Grid1_R3C7').text(), $('#Grid1_R3C8').text(), $('#Grid1_R3C9').text(), $('#Grid1_R3C10').text(), $('#Grid1_R3C11').text(), $('#Grid1_R3C12').text(), $('#Grid1_R3C13').text(), $('#Grid1_R3C14').text(), $('#Grid1_R3C15').text(), $('#Grid1_R3C16').text(), $('#Grid1_R3C17').text(), $('#Grid1_R3C18').text(), $('#Grid1_R3C19').text(), $('#Grid1_R3C20').text(), $('#Grid1_R3C21').text(), $('#Grid1_R3C22').text(), $('#Grid1_R3C23').text(), $('#Grid1_R3C24').text(), $('#Grid1_R3C25').text()],
            [$('#Grid1_R4C1').text(), $('#Grid1_R4C2').text(), $('#Grid1_R4C3').text(), $('#Grid1_R4C4').text(), $('#Grid1_R4C5').text(), $('#Grid1_R4C6').text(), $('#Grid1_R4C7').text(), $('#Grid1_R4C8').text(), $('#Grid1_R4C9').text(), $('#Grid1_R4C10').text(), $('#Grid1_R4C11').text(), $('#Grid1_R4C12').text(), $('#Grid1_R4C13').text(), $('#Grid1_R4C14').text(), $('#Grid1_R4C15').text(), $('#Grid1_R4C16').text(), $('#Grid1_R4C17').text(), $('#Grid1_R4C18').text(), $('#Grid1_R4C19').text(), $('#Grid1_R4C20').text(), $('#Grid1_R4C21').text(), $('#Grid1_R4C22').text(), $('#Grid1_R4C23').text(), $('#Grid1_R4C24').text(), $('#Grid1_R4C25').text()],
            [$('#Grid1_R5C1').text(), $('#Grid1_R5C2').text(), $('#Grid1_R5C3').text(), $('#Grid1_R5C4').text(), $('#Grid1_R5C5').text(), $('#Grid1_R5C6').text(), $('#Grid1_R5C7').text(), $('#Grid1_R5C8').text(), $('#Grid1_R5C9').text(), $('#Grid1_R5C10').text(), $('#Grid1_R5C11').text(), $('#Grid1_R5C12').text(), $('#Grid1_R5C13').text(), $('#Grid1_R5C14').text(), $('#Grid1_R5C15').text(), $('#Grid1_R5C16').text(), $('#Grid1_R5C17').text(), $('#Grid1_R5C18').text(), $('#Grid1_R5C19').text(), $('#Grid1_R5C20').text(), $('#Grid1_R5C21').text(), $('#Grid1_R5C22').text(), $('#Grid1_R5C23').text(), $('#Grid1_R5C24').text(), $('#Grid1_R5C25').text()],
            [$('#Grid1_R6C1').text(), $('#Grid1_R6C2').text(), $('#Grid1_R6C3').text(), $('#Grid1_R6C4').text(), $('#Grid1_R6C5').text(), $('#Grid1_R6C6').text(), $('#Grid1_R6C7').text(), $('#Grid1_R6C8').text(), $('#Grid1_R6C9').text(), $('#Grid1_R6C10').text(), $('#Grid1_R6C11').text(), $('#Grid1_R6C12').text(), $('#Grid1_R6C13').text(), $('#Grid1_R6C14').text(), $('#Grid1_R6C15').text(), $('#Grid1_R6C16').text(), $('#Grid1_R6C17').text(), $('#Grid1_R6C18').text(), $('#Grid1_R6C19').text(), $('#Grid1_R6C20').text(), $('#Grid1_R6C21').text(), $('#Grid1_R6C22').text(), $('#Grid1_R6C23').text(), $('#Grid1_R6C24').text(), $('#Grid1_R6C25').text()],
            [$('#Grid1_R7C1').text(), $('#Grid1_R7C2').text(), $('#Grid1_R7C3').text(), $('#Grid1_R7C4').text(), $('#Grid1_R7C5').text(), $('#Grid1_R7C6').text(), $('#Grid1_R7C7').text(), $('#Grid1_R7C8').text(), $('#Grid1_R7C9').text(), $('#Grid1_R7C10').text(), $('#Grid1_R7C11').text(), $('#Grid1_R7C12').text(), $('#Grid1_R7C13').text(), $('#Grid1_R7C14').text(), $('#Grid1_R7C15').text(), $('#Grid1_R7C16').text(), $('#Grid1_R7C17').text(), $('#Grid1_R7C18').text(), $('#Grid1_R7C19').text(), $('#Grid1_R7C20').text(), $('#Grid1_R7C21').text(), $('#Grid1_R7C22').text(), $('#Grid1_R7C23').text(), $('#Grid1_R7C24').text(), $('#Grid1_R7C25').text()],
            [$('#Grid1_R8C1').text(), $('#Grid1_R8C2').text(), $('#Grid1_R8C3').text(), $('#Grid1_R8C4').text(), $('#Grid1_R8C5').text(), $('#Grid1_R8C6').text(), $('#Grid1_R8C7').text(), $('#Grid1_R8C8').text(), $('#Grid1_R8C9').text(), $('#Grid1_R8C10').text(), $('#Grid1_R8C11').text(), $('#Grid1_R8C12').text(), $('#Grid1_R8C13').text(), $('#Grid1_R8C14').text(), $('#Grid1_R8C15').text(), $('#Grid1_R8C16').text(), $('#Grid1_R8C17').text(), $('#Grid1_R8C18').text(), $('#Grid1_R8C19').text(), $('#Grid1_R8C20').text(), $('#Grid1_R8C21').text(), $('#Grid1_R8C22').text(), $('#Grid1_R8C23').text(), $('#Grid1_R8C24').text(), $('#Grid1_R8C25').text()],
            [$('#Grid1_R9C1').text(), $('#Grid1_R9C2').text(), $('#Grid1_R9C3').text(), $('#Grid1_R9C4').text(), $('#Grid1_R9C5').text(), $('#Grid1_R9C6').text(), $('#Grid1_R9C7').text(), $('#Grid1_R9C8').text(), $('#Grid1_R9C9').text(), $('#Grid1_R9C10').text(), $('#Grid1_R9C11').text(), $('#Grid1_R9C12').text(), $('#Grid1_R9C13').text(), $('#Grid1_R9C14').text(), $('#Grid1_R9C15').text(), $('#Grid1_R9C16').text(), $('#Grid1_R9C17').text(), $('#Grid1_R9C18').text(), $('#Grid1_R9C19').text(), $('#Grid1_R9C20').text(), $('#Grid1_R9C21').text(), $('#Grid1_R9C22').text(), $('#Grid1_R9C23').text(), $('#Grid1_R9C24').text(), $('#Grid1_R9C25').text()],
            [$('#Grid1_R10C1').text(), $('#Grid1_R10C2').text(), $('#Grid1_R10C3').text(), $('#Grid1_R10C4').text(), $('#Grid1_R10C5').text(), $('#Grid1_R10C6').text(), $('#Grid1_R10C7').text(), $('#Grid1_R10C8').text(), $('#Grid1_R10C9').text(), $('#Grid1_R10C10').text(), $('#Grid1_R10C11').text(), $('#Grid1_R10C12').text(), $('#Grid1_R10C13').text(), $('#Grid1_R10C14').text(), $('#Grid1_R10C15').text(), $('#Grid1_R10C16').text(), $('#Grid1_R10C17').text(), $('#Grid1_R10C18').text(), $('#Grid1_R10C19').text(), $('#Grid1_R10C20').text(), $('#Grid1_R10C21').text(), $('#Grid1_R10C22').text(), $('#Grid1_R10C23').text(), $('#Grid1_R10C24').text(), $('#Grid1_R10C25').text()],
            [$('#Grid1_R11C1').text(), $('#Grid1_R11C2').text(), $('#Grid1_R11C3').text(), $('#Grid1_R11C4').text(), $('#Grid1_R11C5').text(), $('#Grid1_R11C6').text(), $('#Grid1_R11C7').text(), $('#Grid1_R11C8').text(), $('#Grid1_R11C9').text(), $('#Grid1_R11C10').text(), $('#Grid1_R11C11').text(), $('#Grid1_R11C12').text(), $('#Grid1_R11C13').text(), $('#Grid1_R11C14').text(), $('#Grid1_R11C15').text(), $('#Grid1_R11C16').text(), $('#Grid1_R11C17').text(), $('#Grid1_R11C18').text(), $('#Grid1_R11C19').text(), $('#Grid1_R11C20').text(), $('#Grid1_R11C21').text(), $('#Grid1_R11C22').text(), $('#Grid1_R11C23').text(), $('#Grid1_R11C24').text(), $('#Grid1_R11C25').text()],
            [$('#Grid1_R12C1').text(), $('#Grid1_R12C2').text(), $('#Grid1_R12C3').text(), $('#Grid1_R12C4').text(), $('#Grid1_R12C5').text(), $('#Grid1_R12C6').text(), $('#Grid1_R12C7').text(), $('#Grid1_R12C8').text(), $('#Grid1_R12C9').text(), $('#Grid1_R12C10').text(), $('#Grid1_R12C11').text(), $('#Grid1_R12C12').text(), $('#Grid1_R12C13').text(), $('#Grid1_R12C14').text(), $('#Grid1_R12C15').text(), $('#Grid1_R12C16').text(), $('#Grid1_R12C17').text(), $('#Grid1_R12C18').text(), $('#Grid1_R12C19').text(), $('#Grid1_R12C20').text(), $('#Grid1_R12C21').text(), $('#Grid1_R12C22').text(), $('#Grid1_R12C23').text(), $('#Grid1_R12C24').text(), $('#Grid1_R12C25').text()],
            [$('#Grid1_R13C1').text(), $('#Grid1_R13C2').text(), $('#Grid1_R13C3').text(), $('#Grid1_R13C4').text(), $('#Grid1_R13C5').text(), $('#Grid1_R13C6').text(), $('#Grid1_R13C7').text(), $('#Grid1_R13C8').text(), $('#Grid1_R13C9').text(), $('#Grid1_R13C10').text(), $('#Grid1_R13C11').text(), $('#Grid1_R13C12').text(), $('#Grid1_R13C13').text(), $('#Grid1_R13C14').text(), $('#Grid1_R13C15').text(), $('#Grid1_R13C16').text(), $('#Grid1_R13C17').text(), $('#Grid1_R13C18').text(), $('#Grid1_R13C19').text(), $('#Grid1_R13C20').text(), $('#Grid1_R13C21').text(), $('#Grid1_R13C22').text(), $('#Grid1_R13C23').text(), $('#Grid1_R13C24').text(), $('#Grid1_R13C25').text()],
            [$('#Grid1_R14C1').text(), $('#Grid1_R14C2').text(), $('#Grid1_R14C3').text(), $('#Grid1_R14C4').text(), $('#Grid1_R14C5').text(), $('#Grid1_R14C6').text(), $('#Grid1_R14C7').text(), $('#Grid1_R14C8').text(), $('#Grid1_R14C9').text(), $('#Grid1_R14C10').text(), $('#Grid1_R14C11').text(), $('#Grid1_R14C12').text(), $('#Grid1_R14C13').text(), $('#Grid1_R14C14').text(), $('#Grid1_R14C15').text(), $('#Grid1_R14C16').text(), $('#Grid1_R14C17').text(), $('#Grid1_R14C18').text(), $('#Grid1_R14C19').text(), $('#Grid1_R14C20').text(), $('#Grid1_R14C21').text(), $('#Grid1_R14C22').text(), $('#Grid1_R14C23').text(), $('#Grid1_R14C24').text(), $('#Grid1_R14C25').text()],
            [$('#Grid1_R15C1').text(), $('#Grid1_R15C2').text(), $('#Grid1_R15C3').text(), $('#Grid1_R15C4').text(), $('#Grid1_R15C5').text(), $('#Grid1_R15C6').text(), $('#Grid1_R15C7').text(), $('#Grid1_R15C8').text(), $('#Grid1_R15C9').text(), $('#Grid1_R15C10').text(), $('#Grid1_R15C11').text(), $('#Grid1_R15C12').text(), $('#Grid1_R15C13').text(), $('#Grid1_R15C14').text(), $('#Grid1_R15C15').text(), $('#Grid1_R15C16').text(), $('#Grid1_R15C17').text(), $('#Grid1_R15C18').text(), $('#Grid1_R15C19').text(), $('#Grid1_R15C20').text(), $('#Grid1_R15C21').text(), $('#Grid1_R15C22').text(), $('#Grid1_R15C23').text(), $('#Grid1_R15C24').text(), $('#Grid1_R15C25').text()],
            [$('#Grid1_R16C1').text(), $('#Grid1_R16C2').text(), $('#Grid1_R16C3').text(), $('#Grid1_R16C4').text(), $('#Grid1_R16C5').text(), $('#Grid1_R16C6').text(), $('#Grid1_R16C7').text(), $('#Grid1_R16C8').text(), $('#Grid1_R16C9').text(), $('#Grid1_R16C10').text(), $('#Grid1_R16C11').text(), $('#Grid1_R16C12').text(), $('#Grid1_R16C13').text(), $('#Grid1_R16C14').text(), $('#Grid1_R16C15').text(), $('#Grid1_R16C16').text(), $('#Grid1_R16C17').text(), $('#Grid1_R16C18').text(), $('#Grid1_R16C19').text(), $('#Grid1_R16C20').text(), $('#Grid1_R16C21').text(), $('#Grid1_R16C22').text(), $('#Grid1_R16C23').text(), $('#Grid1_R16C24').text(), $('#Grid1_R16C25').text()],
            [$('#Grid1_R17C1').text(), $('#Grid1_R17C2').text(), $('#Grid1_R17C3').text(), $('#Grid1_R17C4').text(), $('#Grid1_R17C5').text(), $('#Grid1_R17C6').text(), $('#Grid1_R17C7').text(), $('#Grid1_R17C8').text(), $('#Grid1_R17C9').text(), $('#Grid1_R17C10').text(), $('#Grid1_R17C11').text(), $('#Grid1_R17C12').text(), $('#Grid1_R17C13').text(), $('#Grid1_R17C14').text(), $('#Grid1_R17C15').text(), $('#Grid1_R17C16').text(), $('#Grid1_R17C17').text(), $('#Grid1_R17C18').text(), $('#Grid1_R17C19').text(), $('#Grid1_R17C20').text(), $('#Grid1_R17C21').text(), $('#Grid1_R17C22').text(), $('#Grid1_R17C23').text(), $('#Grid1_R17C24').text(), $('#Grid1_R17C25').text()],
            [$('#Grid1_R18C1').text(), $('#Grid1_R18C2').text(), $('#Grid1_R18C3').text(), $('#Grid1_R18C4').text(), $('#Grid1_R18C5').text(), $('#Grid1_R18C6').text(), $('#Grid1_R18C7').text(), $('#Grid1_R18C8').text(), $('#Grid1_R18C9').text(), $('#Grid1_R18C10').text(), $('#Grid1_R18C11').text(), $('#Grid1_R18C12').text(), $('#Grid1_R18C13').text(), $('#Grid1_R18C14').text(), $('#Grid1_R18C15').text(), $('#Grid1_R18C16').text(), $('#Grid1_R18C17').text(), $('#Grid1_R18C18').text(), $('#Grid1_R18C19').text(), $('#Grid1_R18C20').text(), $('#Grid1_R18C21').text(), $('#Grid1_R18C22').text(), $('#Grid1_R18C23').text(), $('#Grid1_R18C24').text(), $('#Grid1_R18C25').text()],
            [$('#Grid1_R19C1').text(), $('#Grid1_R19C2').text(), $('#Grid1_R19C3').text(), $('#Grid1_R19C4').text(), $('#Grid1_R19C5').text(), $('#Grid1_R19C6').text(), $('#Grid1_R19C7').text(), $('#Grid1_R19C8').text(), $('#Grid1_R19C9').text(), $('#Grid1_R19C10').text(), $('#Grid1_R19C11').text(), $('#Grid1_R19C12').text(), $('#Grid1_R19C13').text(), $('#Grid1_R19C14').text(), $('#Grid1_R19C15').text(), $('#Grid1_R19C16').text(), $('#Grid1_R19C17').text(), $('#Grid1_R19C18').text(), $('#Grid1_R19C19').text(), $('#Grid1_R19C20').text(), $('#Grid1_R19C21').text(), $('#Grid1_R19C22').text(), $('#Grid1_R19C23').text(), $('#Grid1_R19C24').text(), $('#Grid1_R19C25').text()],
            [$('#Grid1_R20C1').text(), $('#Grid1_R20C2').text(), $('#Grid1_R20C3').text(), $('#Grid1_R20C4').text(), $('#Grid1_R20C5').text(), $('#Grid1_R20C6').text(), $('#Grid1_R20C7').text(), $('#Grid1_R20C8').text(), $('#Grid1_R20C9').text(), $('#Grid1_R20C10').text(), $('#Grid1_R20C11').text(), $('#Grid1_R20C12').text(), $('#Grid1_R20C13').text(), $('#Grid1_R20C14').text(), $('#Grid1_R20C15').text(), $('#Grid1_R20C16').text(), $('#Grid1_R20C17').text(), $('#Grid1_R20C18').text(), $('#Grid1_R20C19').text(), $('#Grid1_R20C20').text(), $('#Grid1_R20C21').text(), $('#Grid1_R20C22').text(), $('#Grid1_R20C23').text(), $('#Grid1_R20C24').text(), $('#Grid1_R20C25').text()],
            [$('#Grid1_R21C1').text(), $('#Grid1_R21C2').text(), $('#Grid1_R21C3').text(), $('#Grid1_R21C4').text(), $('#Grid1_R21C5').text(), $('#Grid1_R21C6').text(), $('#Grid1_R21C7').text(), $('#Grid1_R21C8').text(), $('#Grid1_R21C9').text(), $('#Grid1_R21C10').text(), $('#Grid1_R21C11').text(), $('#Grid1_R21C12').text(), $('#Grid1_R21C13').text(), $('#Grid1_R21C14').text(), $('#Grid1_R21C15').text(), $('#Grid1_R21C16').text(), $('#Grid1_R21C17').text(), $('#Grid1_R21C18').text(), $('#Grid1_R21C19').text(), $('#Grid1_R21C20').text(), $('#Grid1_R21C21').text(), $('#Grid1_R21C22').text(), $('#Grid1_R21C23').text(), $('#Grid1_R21C24').text(), $('#Grid1_R21C25').text()],
            [$('#Grid1_R22C1').text(), $('#Grid1_R22C2').text(), $('#Grid1_R22C3').text(), $('#Grid1_R22C4').text(), $('#Grid1_R22C5').text(), $('#Grid1_R22C6').text(), $('#Grid1_R22C7').text(), $('#Grid1_R22C8').text(), $('#Grid1_R22C9').text(), $('#Grid1_R22C10').text(), $('#Grid1_R22C11').text(), $('#Grid1_R22C12').text(), $('#Grid1_R22C13').text(), $('#Grid1_R22C14').text(), $('#Grid1_R22C15').text(), $('#Grid1_R22C16').text(), $('#Grid1_R22C17').text(), $('#Grid1_R22C18').text(), $('#Grid1_R22C19').text(), $('#Grid1_R22C20').text(), $('#Grid1_R22C21').text(), $('#Grid1_R22C22').text(), $('#Grid1_R22C23').text(), $('#Grid1_R22C24').text(), $('#Grid1_R22C25').text()],
            [$('#Grid1_R23C1').text(), $('#Grid1_R23C2').text(), $('#Grid1_R23C3').text(), $('#Grid1_R23C4').text(), $('#Grid1_R23C5').text(), $('#Grid1_R23C6').text(), $('#Grid1_R23C7').text(), $('#Grid1_R23C8').text(), $('#Grid1_R23C9').text(), $('#Grid1_R23C10').text(), $('#Grid1_R23C11').text(), $('#Grid1_R23C12').text(), $('#Grid1_R23C13').text(), $('#Grid1_R23C14').text(), $('#Grid1_R23C15').text(), $('#Grid1_R23C16').text(), $('#Grid1_R23C17').text(), $('#Grid1_R23C18').text(), $('#Grid1_R23C19').text(), $('#Grid1_R23C20').text(), $('#Grid1_R23C21').text(), $('#Grid1_R23C22').text(), $('#Grid1_R23C23').text(), $('#Grid1_R23C24').text(), $('#Grid1_R23C25').text()],
            [$('#Grid1_R24C1').text(), $('#Grid1_R24C2').text(), $('#Grid1_R24C3').text(), $('#Grid1_R24C4').text(), $('#Grid1_R24C5').text(), $('#Grid1_R24C6').text(), $('#Grid1_R24C7').text(), $('#Grid1_R24C8').text(), $('#Grid1_R24C9').text(), $('#Grid1_R24C10').text(), $('#Grid1_R24C11').text(), $('#Grid1_R24C12').text(), $('#Grid1_R24C13').text(), $('#Grid1_R24C14').text(), $('#Grid1_R24C15').text(), $('#Grid1_R24C16').text(), $('#Grid1_R24C17').text(), $('#Grid1_R24C18').text(), $('#Grid1_R24C19').text(), $('#Grid1_R24C20').text(), $('#Grid1_R24C21').text(), $('#Grid1_R24C22').text(), $('#Grid1_R24C23').text(), $('#Grid1_R24C24').text(), $('#Grid1_R24C25').text()],
            [$('#Grid1_R25C1').text(), $('#Grid1_R25C2').text(), $('#Grid1_R25C3').text(), $('#Grid1_R25C4').text(), $('#Grid1_R25C5').text(), $('#Grid1_R25C6').text(), $('#Grid1_R25C7').text(), $('#Grid1_R25C8').text(), $('#Grid1_R25C9').text(), $('#Grid1_R25C10').text(), $('#Grid1_R25C11').text(), $('#Grid1_R25C12').text(), $('#Grid1_R25C13').text(), $('#Grid1_R25C14').text(), $('#Grid1_R25C15').text(), $('#Grid1_R25C16').text(), $('#Grid1_R25C17').text(), $('#Grid1_R25C18').text(), $('#Grid1_R25C19').text(), $('#Grid1_R25C20').text(), $('#Grid1_R25C21').text(), $('#Grid1_R25C22').text(), $('#Grid1_R25C23').text(), $('#Grid1_R25C24').text(), $('#Grid1_R25C25').text()]
            ];
    
        return gridArray;
    }
    Q1/ I need to call that from a server side button_click event, and retrieve the returned array. Can someone show me how to do that?

    Q2/ I want the function to return array()(), i.e. an array of arrays, and not a 2D array...

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,556

    Re: Webforms - Call javascript function from server side and retrieve return value

    Very bad practice and not sure it can be done on button server event.
    I'm under the impression that it can only be used on the load event registerclientscript or something like that.
    Let me take a look...

    OK, if ever, like here but other than that it's still a very bad idea. You should be using some call (like Ajax) to send what you want on the server side and let it do what it must do.

    https://stackoverflow.com/questions/...in-code-behind

    Q2 I'm very bad with arrays.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  3. #3

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,373

    Re: Webforms - Call javascript function from server side and retrieve return value

    Problem is the button must be run server side. The grid tds, I can display them in page_load, but thereís no way to retrieve user input on the server side. I need to retrieve values on form submit, but I still need the array server side.

  4. #4
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,556

    Re: Webforms - Call javascript function from server side and retrieve return value

    Of course there is a way to retrieve user input server side. Call a web service in whatever implementation you want , including the javascript data in Json.
    Else, what are you gong to do here? You are stuck.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  5. #5

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,373

    Re: Webforms - Call javascript function from server side and retrieve return value

    Quote Originally Posted by sapator View Post
    Of course there is a way to retrieve user input server side. Call a web service in whatever implementation you want , including the javascript data in Json.
    Else, what are you gong to do here? You are stuck.
    I'm trying to save the array as a JSON session variable now. I think my array is badly formed. Can you see any way to fix that?

  6. #6
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,556

    Re: Webforms - Call javascript function from server side and retrieve return value

    What is the array output?
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  7. #7

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,373

    Re: Webforms - Call javascript function from server side and retrieve return value

    Iím still unsure about that. Thatís my next stepÖ testing the Array and the JSON string

  8. #8
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,556

    Re: Webforms - Call javascript function from server side and retrieve return value

    OK.
    I think someone, if not me, will be able to help on the array issue.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  9. #9

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,373

    Re: Webforms - Call javascript function from server side and retrieve return value

    I finally got it working. I can handle onclick for server side alongside onclientclick in javascript clientside which runs first. Iíve been able to do what I wanted through page_load and postbacks. Iím pleased with the progress now, after exploring too many dead-endsÖ

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