on 07-27-2005 11:36 PM
In JSP of the JSPDynpage component, how to auto load a function??How can achieve the functionality that we could normally get thru <body onload="alert('Hello SAP!')"></body>
Can anyone please tell me how equivalent the below to regular html tags??
<hbj:content id="myContext" >
<hbj:page title="PageTitle">
<hbj:form id="myFormId" >
</hbj:form>
</hbj:page>
</hbj:content>
Thanx for all Inputs!
Hi Peter,
In JSPdynpage u can use HTML and javascript as it is.
Regards
gEorgE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Peter
I don't think that this is going to work. The main reason is that using the JspDynpages (and AbstractPortalComponents) there is some Javascript that already captures the onload event. Also, code that generates the HTML for the component already puts a BODY tag into the output.
Therefore you would have to do something like this
<script language="JavaScript">
function hello(){
alert('hello');
}
window.onload=hello;
</script>
and this will override the standard onload method
I hope this helps
Darrell
Hi Peter,
You can use the following piece of code:
<script language="javascript">
function abc()
{
alert("Hi");
}
</script>
<body onload=abc()>
Thanx & Regards
Anish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Peter (and everyone else)
I created a simply little test component and your can't use the <body onload="myfunction()"> because of the reasons that I mentioned in my previous post. When doing this nothing happens, unless this is different in NW04, but for SP2 this definately doesn't work. This is why the window.onload=myfunction definately works
D
Thanx for all Inputs,
Darrell,
I've tried window.onload=myfunction but itz not working for me. I know <body> tag has no effect. Iam on SP12 of portal.
How do we control JSP to load a function first and then the rest??
can we sue something like this??
<hbj:content>
<hbj:document>
<hbj:document body>
</hbj:document body>
<hbj:form>
</hbj:form>
</hbj:document>
</hbj:content>
I have seen the above code on SDN..
Thanx.
Hi Peter
Even this would work
<script language="javascript">
alert("Hellp SAP!");
</script>
Regards
Pran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.