We help IT Professionals succeed at work.

problem with the print statement in Lotus script

saleemkhan
saleemkhan asked
on
hai experts,
   I created one agent which is fetching data from oracle and displaying the result with print stat with marquee tag.

Here is the agent

Sub Initialize
     Dim ocon As New odbcconnection
     
     Dim oqry As New odbcquery
     Dim oqry_activecards As New odbcquery
         
     Dim ores As New odbcresultset
     
If (ocon.connectto("datasoure","username","password")) Then
Set oqry.connection=ocon
oqry.sql="select count(*) mtot from user_services where status='A' and user_name like '9%'"          

Set ores.query=oqry
Call ores.execute          
         
Print "<body bgcolor="red">"+"<marquee scrollamount=3>" +"<font color="blue">"+"promotion: Total winners"  +"<Script language=""Javascript"">"+ "window.focus();"+ "<a href="+"<location.href='/"+ "Testdatabase.nsf/test2?openform resizable=0; "+ "onclick='test();return false';" +"target=_blank>"+"'"+"</script>"+Cstr(ores.getvalue("total"))+"</a>"+ "</marquee>" +"</body>"
         
          ocon.disconnect
     Else
          Msgbox ocon.geterrormessage,0,"odbc error"
         
     End If
End Sub
         
I am able to display the result of the query but when click on the anchor tag i want to open a popuup window with details(some otherpage).if the popup window is minimized it should open again by click on the result anchor tag again.

how to implement javascipt in the print stat.



         
         
Comment
Watch Question

Author

Commented:
hai experts,
  i think my question is somewhat confusing so here is in short

in prinst stat Cstr(ores.getvalue("total").
For ex let say total   :50.

so when i click on the 50 value i want to open a popup window displaying the results.

so i embed anchor tag and javascript.it seems its somewhat complicated.how to solve this problem.

Author

Commented:
hai experts,
To be more clear the following print stat is working fine without any javascript without errors.

Print "<body bgcolor="red">"+"<marquee scrollamount=3>" +"<font color="blue">"+"promotion: Total winners"  +"<a href=>"+Cstr(ores.getvalue("total"))+"</a>"+ "</marquee>" +"</body>"


i think i am wrong while embedding javascript code in the following print stat.


Print "<body bgcolor="red">"+"<marquee scrollamount=3>" +"<font color="blue">"+"promotion: Total winners"
 +"<Script language=""Javascript"">"+ "window.focus();"+ "<a href="+"<location.href='/"+ "Testdatabase.nsf/test2?openform
resizable=0; "+ "onclick='test();return false';" +"target=_blank>"+"'"+"</script>"+Cstr(ores.getvalue("total"))+"</a>"+
"</marquee>" +"</body>"
         

where i am wrong?
can anybody will help.?

waiting for reply.
Commented:
Hello saleemkhan,

first of all: when you start the tag: <SCRIPT>
than are all other html tags invalied until next: </SCRIPT>
You can not embad html code into script section.

Whan I have understud your question right, than you ask:
How to open a new window, when clicking on a link, and be sure that this window is not minimized?

If I am right, than confirm this. I have answered this question and now have to find the code for you in my answers.

So long,
zvonko

Commented:
Saleem,

I found the question: it was yours!

You are still on this? I thought it was solved.
So where to work on? In this question or in the old one?

Waiting for your decision.

So long,
zvonko

Author

Commented:
hai zvonko,
   My previous question is solved.i have the code to open popup and minimized and maximised but i found some difficulty in this print stat.so how to solve this.

i am not still not on the same problem.but this someother application where i am struck with the same problem.

waiting for reply.
saleem.

Author

Commented:
My question is not how to open a popup window.i have the code to open a popup window minimized or maximised but
my question is how to embed the script in the above agent i mean in the print statement.


waiting for reply.
saleem.
ZvonkoSystems architect
CERTIFIED EXPERT
Top Expert 2006

Commented:
Hello saleem,

have you solved your JavaScript window.open() call from LotusScript?

ZvonkoSystems architect
CERTIFIED EXPERT
Top Expert 2006

Commented:
Hello saleem,

I was looking trough your former questions and found this one not closed.

Perhaps is this one related to that:
http://www.experts-exchange.com/Applications/Email/Lotus_Notes/Q_20427136.html

Do you have any further question on this?
If not, then please grant this points to me :-)
But please, when you grant to me, give me an A grading :-)

Thanks,
Zvonko

CERTIFIED EXPERT

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept zvonko's comment as answer
Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

CRAK
EE Cleanup Volunteer

Explore More ContentExplore courses, solutions, and other research materials related to this topic.