|
i am dynamically generating accounting reports and balance sheets. then i want to provide an option for print. the user can specify custom headers and footers for the pages of the report and they should be printed on each page of the report. how can i do that??
|
|
|
|
|
Ok reserch the following:
Ajax
window.print();
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
do i have any other option? can i use javascript??
|
|
|
|
|
Ajax is a technique. The code is done in Javascript.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Hi guys,
Sorry if this is a dumb question, but it's been a hard day and I'm struggling to think logically at the moment.
I am getting records out of a database and displaying them in a table. I need the table to be 3 cells across.
Can someone offer any suggestions on how I would, using ASP, automatically insert a TR tag after every 3rd record?
Kind regards and many thanks!
Brad
|
|
|
|
|
|
Thanks for the link Vasudevan, but it's a bit too complicated for what I'm after. I know the thing I'm looking for is simple (one line?) - have seen it before - but just need to remember (*smacks head*).
|
|
|
|
|
Not too hot on the ASP these days (I'm assuming you mean ASP 3.0, as in VBScript) but heres some pseudo code-like suggestion:
var i = 0;
loop start
'your logic
if((i MOD 3) == 0)
'add </tr><tr> tags
i++ 'increment i
loop end
a modus operator is usually '%', every three rows this will return 0 (the remainder). Hmm, not quite one line but thats what I've used before.
|
|
|
|
|
MOD! That's the sucker I was looking for! badgrs, yer a bloody legend!
Thanks a million!
|
|
|
|
|
Hi,
I have a problem with reading the user information sent by SharePoint Portal link.
I have a SharePoint Server where we have designed a home page with links to in house applications. One of these links points to an ASP.NET web site application developed in ASP.NET 2003. I used the Navigation control present on the SharePoint Home Page (I believe this is an inbuilt webpart provided by SharePoint). On clicking of one menu item in this Navigation control, the ASP.NET web application opens in the same page below inside a web page webpart control. I want to display the logged in user;s ID with a message Welcome UserID on ASP.NET application's home page. This thing works for the very first time and shows the correct user name in the message. But when the user loggs into the SharePoint Portal with different UserID (by using "Sign in with different user link), then the changed UserID does not get reflected on the ASP.NET application's home page. It shows the old user id only.
I am using folloing code to read the user id on home page.
string strUser = this.Context.User.Identity.Name;
lblUserName.Text="Welcome " + strUser;
I also tried Request server collection variables like "LOGON_USER", "AUTH_USER", etc. but they didn't work.
How to get the correct user information on ASP.NET application's home page so that it will reflect the changed user id on sharepoint?
Thsnks in advance.
Anil
|
|
|
|
|
Additional information:
Web application is installed on different server. SharePoint is on different server. When the user open the SharePoint Portal page first time, an authentication popup comes. Here the user enters usre id and the password to log in into the sharepoint. After that when the user clicks on my application's link, again the authentication popup comes as the application is on different server. But after changing the User from Sharepoint, no authentication popup is displayed for the application and the application shows the old user id only.
this may help you to understand the scenario better.
anil
|
|
|
|
|
When I append showDialog='Name' to the url location to my page the following statement returns minus 1, for no match.
document.location.search.search( /(^\?|,)showDialog=(['"])?(Name|Number)(\1)?(,|$)/i )
but the next statement returns zero, for a match starting at the begging of the string.
document.location.search.search( /(^\?|,)showDialog=(['"])?(Name|Number)(['"])?(,|$)/i )
The difference between the two is that the first one is supposed to match the quotes that enclose the word Name or Number.
On page 170 of the O'Reilly book, JavaScript The Definitive Guide, by David Flanagan, a very good book on JavaSrcipt, the following example is shown and works:
/(['"])[^!"]*\1
This pattern looks for either a single or double quote, followed by any other characters, then the matching single or double quote that was initially found.
What I need for there to be an optional initial single or double quote, followed by either Name or Number, then the matching quote that matches the initial single or double quote, if any. This pattern is to occur immediately after the url location's query string's question mark or after that after a comma. The pattern should then end with a following comma or the end of the string.
Can any Regular Expression Gurus tell me why the first statement doesn't work and the correct pattern to use?
Until then I can use the second expression, understanding that the Name/Number value may not actually be enclosed with matching quotes.
Thank you.
|
|
|
|
|
howardjr wrote: When I append showDialog='Name' to the url location to my page the following statement returns minus 1, for no match.
document.location.search.search( /(^\?|,)showDialog=(['"])?(Name|Number)(\1)?(,|$)/i )
The \1 backreference is mathing the first capture (^\?|,), not the second capture (['"]). If you want to match the second capture, use \2 instead.
---
Year happy = new Year(2007);
|
|
|
|
|
|
The match at index 0 returns the entire expression, that's why the matches are 1 based, not 0 based.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Ah, thank you for that additional information
|
|
|
|
|
Hello i'm working on a website with a few problems. I'm interested to know hot to fix this problem
Problem: The page looks odd when viewed by the cached page link in google results. In full screen the page is ok. If you have a spare minute can you type in a search for "ebiz" then click on the cached page view. Alternatively go direct to http://www.ecbiz.co.uk/wii-console.htm[^] to see the fault.
thanks for your time
A
|
|
|
|
|
Other than the menus being all out of whack because the page has been changed, I do not see a problem
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Brad, what do you mean by the pages being out of whack? What web browser and O/S are you using?
A
|
|
|
|
|
I clicked the cached link and things went funny. I was using ie7. Can you please provide a direct link to what you want us to look at?
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Aha that's great that you saw things went funny on ie7. Perhaps you know the easiest way to fix the design with minimal work?
A
|
|
|
|
|
A lot of sites look funny in the google cache option, why are you worried about this?
|
|
|
|
|
I'm interested in fixing the problem, so i don't make the same design mistakes in the future. Also i need to fix it so i can read the other info, such as date time cached.
A
|
|
|
|
|
No-one uses the cached results
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
why this is wont work on ie6
1...var html_doc = document.getElementsByTagName('head').item(0);
2...var js = document.createElement('script');
3...js.setAttribute('language', 'javascript');
4...js.setAttribute('type', 'text/javascript');
5...js.setAttribute('src', script_filename);
6...html_doc.appendChild(js);
7...return false;
there's no error...
and the strange thing is when i add a nalert statement after line 6, it works fine...
i need help!
Faris Madi
Nothing Comes Easy (N.C.E.)
|
|
|
|