NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: ianburgess on August 17, 2012, 06:19:20 AM
-
I have a memory form which collects date range for a report and is set so the actions of the form run the Report procedure in a new tab (when the user clicks "Save" which is renamed as "Go").
This all works fine but I would like the memory form to close and for the HomePage to open when the user clicks Go (as well as opening the report in a new tab). I have tried embedding p_web.Script(p_web.WindowOpen('HomePage')) but cannot find a place where it will not stop the report being run - effectively I need the report to run and then open the Homepage.
Any suggestions?
-
Just call a standard report procedure (without the nettalk extension) on the server side code when the user presses the save button.
-
But if I call the report without the Nettalk extension, surely it wont open in the browser?
-
>> This all works fine but I would like the memory form to close and for the HomePage to open when the user clicks Go (as well as opening the report in a new tab).
you can't do 2 things at once, without some understanding of the JavaScript language.
Cheers
Bruce
-
Thanks Bruce, I understand that the Javascript that is used to call the report needs to open the Homepage. Can you or anyone help me as to what to embed and where that would achieve this?
Many thanks.
-
I don't know if this will work for you, but the following javascript will display a pdf on your main page or any page
so you can save the report as a pdf and then display it with this code.
This code works with a hardcoded pdf name,
maybe someone can improve so we can use a variable.
<script language="javascript">
if ((navigator.appName).match(/Explorer/i) != null) {
document.write('<OBJECT CLASSID="clsid:CA8A9780-280D-11CF-A24D-444553540000" WIDTH="100%" HEIGHT="500">');
document.write('<PARAM NAME="SRC" VALUE="test.pdf"/>');
document.write('</OBJECT>');
} else {
document.write('<EMBED src="test.pdf" width="100%" height="500" type="application/pdf">');
document.write('</EMBED>');
}
</script>