Skip to content

Question about button javascript: submitbutton('save')

It is possible to teach gsa ser to send form which have save button for publish new article:
<a class="toolbar" href="#" onclick="javascript: submitbutton('save'); return false;">

??

Comments

  • SvenSven www.GSA-Online.de

    Yes, you can use "modify url=<form url>" and "post data=<string to send as post...".

    Or well show me the sample html site .

  • there is necessary also 

    form request with=XMLHttpRequest

    ?
  • SvenSven www.GSA-Online.de
    I don't know, check what the your browser submits here. If javascript is involved then yes, usually it sends it.
  • edited March 2014

    After submit post data is like this

    title

    1111111111111

    alias

    33333333333

    catid

    1

    featured

    0

    published

    1

    text

    <p>22222222222222</p>

    image


    ...


    task

    save

    Itemid

    0

    dd5274303eb4451fef7c68465...

    1

    created_by

    75

    created_by_alias


    access

    0

    created

    2014-03-22 09:41:18

    publish_up

    2014-03-22 09:41:18





    I put 











    modify url=./index.php

    post data=title=%website_title%&alias=999999999999&catid=1&featured=0&published=1&isSite=1&text=%description_250%&task=save


    But there is no effect

  • SvenSven www.GSA-Online.de
    you forgot "just download=1" else it searched for a form after download.
  • edited March 2014

    it is there but reallly I think the problem is elsewhere

    First my code

    modify url=./index.php

    form request with=XMLHttpRequest

    post data=title=%website_title%&alias=aa&catid=1&featured=0&published=1&isSite=1&text=%description_250%&task=save

    just download=1

    ---------  

    Then in form I have code linke this

    <input type="hidden" name="isSite" value="1" />
    ...
    
    <input type="hidden" name="f313ffbb97939f15922639e64e2d18d5" value="1" />						</td>

    ...

    and there I have the problem - f313ffbb97939f15922639e64e2d18d5 is a token and is changing for each session.

    How can I get this value and insert in in post data???

    Without this I have as result "Invalid Token"

    Regards

  • SvenSven www.GSA-Online.de

    You must define that of course differently to get to the desired place on the hml code...one front is not working.

    [token]

    type=extract

    front1=<input type="hidden" name="

    back="


    ...

    and later you use...

    post data=title=%website_title%&alias=aa&catid=1&featured=0&published=1&isSite=1&text=%description_250%&task=save&%token%=1



  • edited March 2014
    Thans a lot - it works, but noto at all

    if you have a html like

    <input type="hidden" name="A" value="AAA" />
    <input type="hidden" name="B" value="BBB" />
    <input type="hidden" name="C" value="CCC" />
    <input type="hidden" name="MY_VALUE" value="1" />	</form>
    with 
    [MYVALUE]
    type=extract
    front1=input type="hidden" name="
    back=" value="1" />

    I will get all this

    A" value="AAA" />
    <input type="hidden" name="B" value="BBB" />
    <input type="hidden" name="C" value="CCC" />
    <input type="hidden" name="MY_VALUE
    Not olny first line.
    Is there any possibility to get only ONE line? 

    Regards
  • SvenSven www.GSA-Online.de
    maybe you should not simulate the post step but normally let it extract the form variables itself using "form name", "forum url" and just change the url it submits to with "modify submit url".
Sign In or Register to comment.