Re: [Dev] how to overcome page reload after postback?
Hi Nashry, Why don't you call a js method onClick, that would do an ajax call (POST) and onSuccess call DrawGraph() method? You can come with something like below. $("button").click(function(){ $.ajax({url: "demo_test.txt", // Make a post ajax call to your jaggery api so you can retrieve the params success: function(result){ DrawGraph(); }}); }); Thanks, Himasha On Fri, Jul 10, 2015 at 4:28 PM, Aaquibah Nashry wrote: > Hi Irham, > > Now it doesnt disappear. but i dont get the value of the variable im > retrieving. > Any suggestions how i can retrieve form elements into jaggery? > > Regards, > > M.R.Aaquibah Nashry > *Intern, Engineering**| **WSO2, Inc.* > Mobile : +94 773946123 > Tel : +94 112662541 > Email : nas...@wso2.com > > On Fri, Jul 10, 2015 at 4:09 PM, Irham Iqbal wrote: > >> Hi Nashry, >> >> I think since you have > submitted change it to > >> Thanks, >> Iqbal >> >> On Fri, Jul 10, 2015 at 4:01 PM, Aaquibah Nashry wrote: >> >>> well... i used the following code: >>> >>> >>> >>> >> value="FullYear" onclick="DisableDropdown()">Display Full year >>> >>> Enter Year: >>> >> align="right"> >>> Select Quarter: >>> >>> 1 >>> 2 >>> 3 >>> 4 >>> >>> >> value="Generate Graph" onClick="DrawGraph()"> >>> >>> >>> >>> <% >>> >>> if(request.getMethod() == "POST"){ >>> var dyear = request.getParameter("Year"); >>> >>> if(!dyear){ >>> response.status = 400; >>> } >>> else{ >>> //query >>> response.status = 200 >>> } >>> } >>> >>> Regards, >>> >>> M.R.Aaquibah Nashry >>> *Intern, Engineering**| **WSO2, Inc.* >>> Mobile : +94 773946123 >>> Tel : +94 112662541 >>> Email : nas...@wso2.com >>> >>> On Fri, Jul 10, 2015 at 3:40 PM, Lakshani Gamage >>> wrote: >>> Hi Nashry, How did you send form details to server side? Did you use AJAX or something else? Thanks, Lakshani. On Fri, Jul 10, 2015 at 3:14 PM, Aaquibah Nashry wrote: > Hi, > > i am calling a post method in a form. When submitted, a graph should > be displayed. > When i run the page in a browser, the graph appears and then > disappears within seconds. > > I think after postback the page reloads. > How can i overcome this? > > I am using javascript and jaggery. > > Thanks in advance > Regards, > > M.R.Aaquibah Nashry > *Intern, Engineering**| **WSO2, Inc.* > Mobile : +94 773946123 > Tel : +94 112662541 > Email : nas...@wso2.com > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Lakshani Gamage *Software Engineer* Mobile : +94 (0) 71 5478184 <%2B94%20%280%29%20773%20451194> >>> >>> >>> ___ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Irham Iqbal >> Software Engineer - Test Automation >> WSO2, Inc.: http://wso2.com >> lean. enterprise. middleware >> phone: +94 777888452 >> > > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Himasha Guruge *Software Engineer* WS*O2* *Inc.* Mobile: +94 777459299 himas...@wso2.com ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] how to overcome page reload after postback?
Hi Irham, Now it doesnt disappear. but i dont get the value of the variable im retrieving. Any suggestions how i can retrieve form elements into jaggery? Regards, M.R.Aaquibah Nashry *Intern, Engineering**| **WSO2, Inc.* Mobile : +94 773946123 Tel : +94 112662541 Email : nas...@wso2.com On Fri, Jul 10, 2015 at 4:09 PM, Irham Iqbal wrote: > Hi Nashry, > > I think since you have change it to > Thanks, > Iqbal > > On Fri, Jul 10, 2015 at 4:01 PM, Aaquibah Nashry wrote: > >> well... i used the following code: >> >> >> >> > value="FullYear" onclick="DisableDropdown()">Display Full year >> >> Enter Year: >> > align="right"> >> Select Quarter: >> >> 1 >> 2 >> 3 >> 4 >> >> > value="Generate Graph" onClick="DrawGraph()"> >> >> >> >> <% >> >> if(request.getMethod() == "POST"){ >> var dyear = request.getParameter("Year"); >> >> if(!dyear){ >> response.status = 400; >> } >> else{ >> //query >> response.status = 200 >> } >> } >> >> Regards, >> >> M.R.Aaquibah Nashry >> *Intern, Engineering**| **WSO2, Inc.* >> Mobile : +94 773946123 >> Tel : +94 112662541 >> Email : nas...@wso2.com >> >> On Fri, Jul 10, 2015 at 3:40 PM, Lakshani Gamage >> wrote: >> >>> Hi Nashry, >>> >>> How did you send form details to server side? Did you use AJAX or >>> something else? >>> >>> Thanks, >>> Lakshani. >>> >>> On Fri, Jul 10, 2015 at 3:14 PM, Aaquibah Nashry >>> wrote: >>> Hi, i am calling a post method in a form. When submitted, a graph should be displayed. When i run the page in a browser, the graph appears and then disappears within seconds. I think after postback the page reloads. How can i overcome this? I am using javascript and jaggery. Thanks in advance Regards, M.R.Aaquibah Nashry *Intern, Engineering**| **WSO2, Inc.* Mobile : +94 773946123 Tel : +94 112662541 Email : nas...@wso2.com ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >>> -- >>> Lakshani Gamage >>> >>> *Software Engineer* >>> Mobile : +94 (0) 71 5478184 <%2B94%20%280%29%20773%20451194> >>> >> >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Irham Iqbal > Software Engineer - Test Automation > WSO2, Inc.: http://wso2.com > lean. enterprise. middleware > phone: +94 777888452 > ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] how to overcome page reload after postback?
Hi Nashry, I think since you have wrote: > well... i used the following code: > > > > value="FullYear" onclick="DisableDropdown()">Display Full year > > Enter Year: > align="right"> > Select Quarter: > > 1 > 2 > 3 > 4 > > > > > > <% > > if(request.getMethod() == "POST"){ > var dyear = request.getParameter("Year"); > > if(!dyear){ > response.status = 400; > } > else{ > //query > response.status = 200 > } > } > > Regards, > > M.R.Aaquibah Nashry > *Intern, Engineering**| **WSO2, Inc.* > Mobile : +94 773946123 > Tel : +94 112662541 > Email : nas...@wso2.com > > On Fri, Jul 10, 2015 at 3:40 PM, Lakshani Gamage > wrote: > >> Hi Nashry, >> >> How did you send form details to server side? Did you use AJAX or >> something else? >> >> Thanks, >> Lakshani. >> >> On Fri, Jul 10, 2015 at 3:14 PM, Aaquibah Nashry wrote: >> >>> Hi, >>> >>> i am calling a post method in a form. When submitted, a graph should be >>> displayed. >>> When i run the page in a browser, the graph appears and then disappears >>> within seconds. >>> >>> I think after postback the page reloads. >>> How can i overcome this? >>> >>> I am using javascript and jaggery. >>> >>> Thanks in advance >>> Regards, >>> >>> M.R.Aaquibah Nashry >>> *Intern, Engineering**| **WSO2, Inc.* >>> Mobile : +94 773946123 >>> Tel : +94 112662541 >>> Email : nas...@wso2.com >>> >>> ___ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Lakshani Gamage >> >> *Software Engineer* >> Mobile : +94 (0) 71 5478184 <%2B94%20%280%29%20773%20451194> >> > > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Irham Iqbal Software Engineer - Test Automation WSO2, Inc.: http://wso2.com lean. enterprise. middleware phone: +94 777888452 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] how to overcome page reload after postback?
well... i used the following code: Display Full year Enter Year: Select Quarter: 1 2 3 4 <% if(request.getMethod() == "POST"){ var dyear = request.getParameter("Year"); if(!dyear){ response.status = 400; } else{ //query response.status = 200 } } Regards, M.R.Aaquibah Nashry *Intern, Engineering**| **WSO2, Inc.* Mobile : +94 773946123 Tel : +94 112662541 Email : nas...@wso2.com On Fri, Jul 10, 2015 at 3:40 PM, Lakshani Gamage wrote: > Hi Nashry, > > How did you send form details to server side? Did you use AJAX or > something else? > > Thanks, > Lakshani. > > On Fri, Jul 10, 2015 at 3:14 PM, Aaquibah Nashry wrote: > >> Hi, >> >> i am calling a post method in a form. When submitted, a graph should be >> displayed. >> When i run the page in a browser, the graph appears and then disappears >> within seconds. >> >> I think after postback the page reloads. >> How can i overcome this? >> >> I am using javascript and jaggery. >> >> Thanks in advance >> Regards, >> >> M.R.Aaquibah Nashry >> *Intern, Engineering**| **WSO2, Inc.* >> Mobile : +94 773946123 >> Tel : +94 112662541 >> Email : nas...@wso2.com >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Lakshani Gamage > > *Software Engineer* > Mobile : +94 (0) 71 5478184 <%2B94%20%280%29%20773%20451194> > ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] how to overcome page reload after postback?
Hi Nashry, I think you might be sending the data using jquery post or ajax. After that you might be submitting the form again because of that page is getting refreshed and you're loosing the graph. Thanks, Iqbal On Fri, Jul 10, 2015 at 3:40 PM, Lakshani Gamage wrote: > Hi Nashry, > > How did you send form details to server side? Did you use AJAX or > something else? > > Thanks, > Lakshani. > > On Fri, Jul 10, 2015 at 3:14 PM, Aaquibah Nashry wrote: > >> Hi, >> >> i am calling a post method in a form. When submitted, a graph should be >> displayed. >> When i run the page in a browser, the graph appears and then disappears >> within seconds. >> >> I think after postback the page reloads. >> How can i overcome this? >> >> I am using javascript and jaggery. >> >> Thanks in advance >> Regards, >> >> M.R.Aaquibah Nashry >> *Intern, Engineering**| **WSO2, Inc.* >> Mobile : +94 773946123 >> Tel : +94 112662541 >> Email : nas...@wso2.com >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Lakshani Gamage > > *Software Engineer* > Mobile : +94 (0) 71 5478184 <%2B94%20%280%29%20773%20451194> > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Irham Iqbal Software Engineer - Test Automation WSO2, Inc.: http://wso2.com lean. enterprise. middleware phone: +94 777888452 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] how to overcome page reload after postback?
Hi Nashry, How did you send form details to server side? Did you use AJAX or something else? Thanks, Lakshani. On Fri, Jul 10, 2015 at 3:14 PM, Aaquibah Nashry wrote: > Hi, > > i am calling a post method in a form. When submitted, a graph should be > displayed. > When i run the page in a browser, the graph appears and then disappears > within seconds. > > I think after postback the page reloads. > How can i overcome this? > > I am using javascript and jaggery. > > Thanks in advance > Regards, > > M.R.Aaquibah Nashry > *Intern, Engineering**| **WSO2, Inc.* > Mobile : +94 773946123 > Tel : +94 112662541 > Email : nas...@wso2.com > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Lakshani Gamage *Software Engineer* Mobile : +94 (0) 71 5478184 <%2B94%20%280%29%20773%20451194> ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] how to overcome page reload after postback?
Hi, i am calling a post method in a form. When submitted, a graph should be displayed. When i run the page in a browser, the graph appears and then disappears within seconds. I think after postback the page reloads. How can i overcome this? I am using javascript and jaggery. Thanks in advance Regards, M.R.Aaquibah Nashry *Intern, Engineering**| **WSO2, Inc.* Mobile : +94 773946123 Tel : +94 112662541 Email : nas...@wso2.com ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev