Forum Discussion
AmmarAl-Hadeeth
8 years agoQrew Member
The xml is saying no error but you are missing the reload, is that correct ? any way , this is my suggestion.
var text url1 = "[URL1]";
var text url1 = "[URL2]";
"javascript: "
&" $.get($URL1,function(xml1){"
&" if ( $("errcode" , xml1).text() == "0"){"
&" $.get($URL2,function(xml2){"
&" if ( $("errcode" , xml2).text() == "0"){"
&" location.reload(true); " "
&" }else{ alert($("errtext" , xml2).text() ) }"
&" })"
& }else{ alert($("errtext" , xml1).text() ) }""
&" })"
Keep in mind that you are writing three levels of encoding
" ' " text "' "
Hope this will help
Regards
var text url1 = "[URL1]";
var text url1 = "[URL2]";
"javascript: "
&" $.get($URL1,function(xml1){"
&" if ( $("errcode" , xml1).text() == "0"){"
&" $.get($URL2,function(xml2){"
&" if ( $("errcode" , xml2).text() == "0"){"
&" location.reload(true); " "
&" }else{ alert($("errtext" , xml2).text() ) }"
&" })"
& }else{ alert($("errtext" , xml1).text() ) }""
&" })"
Keep in mind that you are writing three levels of encoding
" ' " text "' "
Hope this will help
Regards
JasonJohnson
8 years agoQrew Assistant Captain
Yes it is missing the reload. I changed the section at the bottom to the below but I must be missing something because the button is now only firing off the first action not the second and still showing the zero error on the first action.
"<a " & $style & " href='"
& "javascript: "
&" $.get($URLOne,function(xml1){"
&" if ( $("errcode" , xml1).text() == "0"){"
&" $.get($URLTwo,function(xml2){"
&" if ( $("errcode" , xml2).text() == "0"){"
&" location.reload(true); "
&" ;}else{ alert($("errtext" , xml2).text() ) }"
&" })"
&" }else{ alert($("errtext" , xml1).text() ) }"
&" })
"<a " & $style & " href='"
& "javascript: "
&" $.get($URLOne,function(xml1){"
&" if ( $("errcode" , xml1).text() == "0"){"
&" $.get($URLTwo,function(xml2){"
&" if ( $("errcode" , xml2).text() == "0"){"
&" location.reload(true); "
&" ;}else{ alert($("errtext" , xml2).text() ) }"
&" })"
&" }else{ alert($("errtext" , xml1).text() ) }"
&" })