[Greasemonkey] Re: modify java script

V V Raja Rao vvrajarao at gmail.com
Wed Jul 13 07:46:01 EDT 2005


Hi,

Attached below is the java script function: This function is called
when this link on the page is clicked:

<a href="#"  onclick="check(4);return false;" class="zi01">Service Records</a>

-----------------------------------------------------------------------------------------------------------------------------------

function check(parameter){
        if(parameter==1){
            parent.frames(0).location.href="userinfo.jsp" + "?" + new
Date().toString();
        }else if(parameter==2){
            parent.frames(0).location.href="modipswd.jsp" + "?" + new
Date().toString();
        }else if(parameter==3){
             parent.frames(0).location.href="cardrecharge.jsp" + "?" +
new Date().toString();
        }else if(parameter==4){
            parent.frames(0).location.href="serviceRecords.jsp" + "?"
+ new Date().toString();
        }else if(parameter==5){
             parent.frames(0).location.href="rateSelectResult.jsp" +
"?" + new Date().toString();
        }
        else if(parameter==6){
             parent.frames(0).location.href="stopService.jsp" + "?" +
new Date().toString();
        } 
        else if(parameter==7){
             if (confirm("Are you sure to exit?")){
                window.location="../logout.jsp";
                return true;
             }else{
                return false;
             }
        }else if(parameter==8){
             parent.frames(0).location.href="cancelService.jsp" + "?"
+ new Date().toString();
        }else{
             return false;
        }
    }

On 7/13/05, Aaron Boodman <zboogs at gmail.com> wrote:
> It's only possible in some special cases where the javascript function
> gets defined, and then executed at a later time by an event handler --
> onclick for instance.
> 
> If you post to the list with a simple example of what you're trying to
> do, people here can tell you whether it's possible.
> 
> - a
> 
> On 7/12/05, V V Raja Rao <vvrajarao at gmail.com> wrote:
> > Hi,
> > 
> >   The website of my ISP doesn't work with firefox. There is some
> > javascript error in the web pages. Is it possible to modify the
> > javascript function in a page before it gets executed. Can you point
> > me to some examples which do this?
> > 
> > Thanks,
> > Raja.
> > --
> > The greatest battles we fight are in the silent chambers of our own souls
> > _______________________________________________
> > Greasemonkey mailing list
> > Greasemonkey at mozdev.org
> > http://mozdev.org/mailman/listinfo/greasemonkey
> >
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
> 


-- 
The greatest battles we fight are in the silent chambers of our own souls


More information about the Greasemonkey mailing list