Re: Newbie : A simple question, please help me !
- From: "Alan" <alan@xxxxxxxxx>
- Date: Fri, 29 Apr 2005 03:07:14 +0800
Dear Agoston Bejo
I put all my effort to search websites and newgroups, I view over thousand
of message in google, but no exactly answer. Forget me, I have try my best.
In Google, a guys said that he just want to make the user more comfortable,
don't get him wrong. For me, I just hope that the users can search how many
invoice in April, and the result come out in a table format, then they
simply click the "Print" button in the end of the row, without opening the
page, print the invoice no they want. Why so difficult ?
After viewing over hundred of message, I believe that I need to give up. For
over hundred of people can't find the right way, neither me! But the truth
is that, thousand of softwares written by java and asp can do that. My
clients start to contact them. Meanwhile, the onclick"return comfirm" don't
work in ME but work in Xp, thus my program is called "rubblish", agree ?
Once again, Can anyone tell me why all other programmer can do that, what
kind of softwares they used? What newsgroup can I join to get the answer?
"Agoston Bejo" <gusz1@xxxxxxxxx> ¼¶¼g©ó¶l¥ó·s»D:e8BraK8SFHA.2096@xxxxxxxxxxxxxxxxxxxxxxx
>
>
>
> "Alan" <alan@xxxxxxxxx> wrote in message
> news:Oz2YW21SFHA.1040@xxxxxxxxxxxxxxxxxxxxxxx
>> Thanks for yr help. I am advanced in ASP but no sense in JScript. Thus I
>> just build a link like this :
>>
>> While not rs.eof
>> WInv = rs("InvoiceNo")
>> <td><%=rs("InvoiceNo")%></td>
>> <td><%=rs("Name")%></td>
>> <td><a href="InvoicePrint.asp?WInv=<%=WInv%>"></td>
>> rs.MoveNext
>> Wend
>
> You are mixing server-side and client-side code. (The rs object that
> exists
> while the server creates the HTML code has nothing to do with any code run
> on client side.)
>
> There are quite a few discussions on this, you'd better search on the net
> or
> some news archive.
>
>>
>> Now user needs to click the link to open the invoice, and then select
>> File--Print from the menu to print it out, and then return back to print
>> another. As the table is very long, they need to scroll again to find the
>> next one. Such a rubbish program. I check all the ASP web site and try
>> all
>> my best, but I don't know how to insert the variable in
>> "printHidden("InvoicePrint.asp?WInv="+Winv);" with JScript. However, if
>> no
>> variable, it works !
>> printHidden("InvoicePrint.asp?WInv=1001");"
>> printHidden("InvoicePrint.asp?WInv=1002");"
>> .......
>>
>> Please help me !
>>
>>
>> > I post a message "how to print a hidden page" but no answer, thus I try
>> > over
>> > two week then I succes. I can create a table with a "Print" button in
> each
>> > row, when I click one of them, it popup the "Printer" box, however, the
>> > print job name is ("InvoicePrint.asp?WInv=undefined"), that means I
> can't
>> > bring the variable into the function. Please kindly help me how to make
> it
>> > work ?
>> >
>> > <script defer src="printHid.js"></script>
>> >
>> > While not rs.eof
>> > WInv = rs("InvoiceNo")
>> > <td><%=rs("InvoiceNo")%></td>
>> > <td><%=rs("Name")%></td>
>> > <td><input name="idPrintHidden" type="button" value="Print hidden
>> > page" onclick="printURL(this.WInv)"></td>
>> > rs.MoveNext
>> > Wend
>> >
>> > <script defer>
>> > function printURL(Winv) {
>> > idPrintHidden.disabled = true;
>> > window.onprintcomplete = function() {
>> > idPrintHidden.disabled = false;
>> > }
>> > printHidden("InvoicePrint.asp?WInv="+Winv);
>> > }
>> > </script>
>> >
>> >
>> > The "PrintHid.js" downloaded from microsoft.com is as below :
>> >
>> > function printHidden(url) {
>> > document.body.insertAdjacentHTML("beforeEnd",
>> > "<iframe name=printHiddenFrame width=0 height=0></iframe>");
>> > var doc = printHiddenFrame.document;
>> > doc.open();
>> > doc.write("<body onload=\"setTimeout('parent.onprintHiddenFrame()',
>> > 0)\">");
>> > doc.write("<iframe name=printMe width=0 height=0 src=\"" + url +
>> > "\"></iframe>");
>> > doc.write("</body>");
>> > doc.close();
>> > }
>> >
>> > function onprintHiddenFrame() {
>> > function onfinish() {
>> > printHiddenFrame.outerHTML = "";
>> > if ( window.onprintcomplete ) window.onprintcomplete();
>> > }
>> > printFrame(printHiddenFrame.printMe, onfinish);
>> > }
>> >
>> >
>> > Thanks very very very much !
>> >
>>
>> >> Please post only plain text to this newsgroup.
>> > >Please provide a hint as to your problem in the subject line.
>> > >You seem to be defining a variable named WInv in your ASP code
>> > >and then trying to access it as an attribute of an input button.
>>
>>
>
>
.
- References:
- Newbie : A simple question, please help me !
- From: Alan
- Re: Newbie : A simple question, please help me !
- From: Alan
- Re: Newbie : A simple question, please help me !
- From: Agoston Bejo
- Newbie : A simple question, please help me !
- Prev by Date: Re: HOWTO copy nodes from one IFRAME to another IFRAME.
- Next by Date: Re: how add a box (border) for a specific word (word in td)
- Previous by thread: Re: Newbie : A simple question, please help me !
- Next by thread: HOWTO Create a FORM object using W3C techniques.
- Index(es):
Relevant Pages
|