|
I used this script,
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top=0,left=0,scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open('Login.aspx',myname,settings);}
and called the function in onload of tag..... but it keeps on loading again n again
zari
|
|
|
|
|
Hi,
I am using WebBrowser Control and passing the url at run time.
I want to insert some text or javascript into the body of the web page being loaded in the browser.
I tried like below.
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
WebBrowser browse = (WebBrowser)sender;
if (!(webBrowser1.Document.Body.InnerHtml.Contains("Hello")))
{
webBrowser1.Document.Body.InnerHtml = browse.Document.Body.InnerHtml + "<script type='text/javascript'> var Hello; var i; var totalTable = document.getElementsByTagName('table').length; for(i=0;i < totalTable; i++) { document.getElementsByTagName('table')[i].id = 'name' + i; } function myfun() { this.style.border = 'solid 5px Red'; } function myfun1() { this.style.border = 'none'; } for(i=0;i < totalTable; i++) { document.getElementsByTagName('table')[i].onmouseover = myfun; document.getElementsByTagName('table')[i].onmouseout = myfun1; } </script>";
}
}
But, This is not working. This event is fired many times for single page.
Thanks,
Nagaraj
|
|
|
|
|
Hi all,
I have a dataview which contains song titles retrived frm the database and when user click on the play button on each row corresponding song should play.
How can i do the same
Thanks in advance
|
|
|
|
|
u simplay drag drop the sound file and declare them in program.
|
|
|
|
|
I didnt get u can u please give a detailed description please..
|
|
|
|
|
hi Friends ,
I have to make an assignment where i have to insert date in a textbox from a calender calender(ASP.Net.plz send me coding if any one can.
|
|
|
|
|
jasjit jas wrote: I have to make an assignment where i have to insert date in a textbox from a calender calender(ASP.Net.plz send me coding if any one can. Wink
So you want some one else do your home work . I suggest Please Buy a Beginner's ASP.Net Books .
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
jasjit jas wrote: insert date in a textbox from a calender calender
under Calendar1_SelectionChanged event write this snippet
textbox1.Text = Calendar1.SelectedDate.ToString();
hope this helps
Regards,
SunilWise
|
|
|
|
|
I am glad to help you,please contact me with MSN:mazk_good@hotmail.com
|
|
|
|
|
Hi all,
I have a problem with cookies.
I use a cookie with key/value pairs for storing articles.
I have a button "Add article" which adds a key/value pair to the cookie.
When the page reloads I need to access all the values in the cookie and display them.
the problem is that when the button is clicked the cookie is added to the Response and will not be present in the Request until another reload since - I guess - the button event handler is being executed during the page load.
If I add an article it won't show up until I do another reload on the page.
Does anybody have an idea how I can add the cookie with a button and have the value in the Request when the page loads next time.
Hope someone out there understands what I'm trying to explain.
Thank you for your help!!
|
|
|
|
|
Whatever code you have to display the articles can be called from 2 places from page_load and the same code can be called in the button event handler after you add the article to your cookie.
|
|
|
|
|
If I put trace=true for the page I can see that the Response Cookie collection contains my cookie (with the new key/value) after I have pressed the button
but
The Request Cookie collection does not contain the cookie with these Key/value.
to get the Response Cookie collection to be transferred to the Request Cookie collection I need to do another reload of the page.
I need to access the cookie directly when the page is loaded after the button has been pressed.
Is this possible?
Can I in some way have a button that has it's event handler code executed before posting?
|
|
|
|
|
The page load event happens before the button event handler. So the option you have is to again submit the page in the button event handler or to call the method that displays the articles in the button event handler for subsequent submits and for the first time when the page is loaded call that in the page load method.
|
|
|
|
|
Thank you! It works!
I added a method for the update of my GridView and calls it from GridView_Load and the end of the button event handler.
Thanks again!
|
|
|
|
|
hi all
i need to test my web site of performance and loading time of some pages with figures, is there any recommended sites for that, pls help me to find
thanks
|
|
|
|
|
Get the FireBug add-on for Firefox. Using the Net feature you can see the load time for every request.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
thx for ur help, i need to find out what are the drawbacks of my site if there and so on also.
|
|
|
|
|
indSoftware wrote: i need to find out what are the drawbacks of my site if there and so on also.
Follow what he said. Firebug can show the each request load time, JS debugging and many more.
|
|
|
|
|
indSoftware wrote: need to test my web site of performance and loading time of some pages with figures, is there any recommended sites for that, pls help me to find
You have already got very good suggestion . I just want to add one more point on that. there is a tool from IBM , RPT (Rational Performance Tester ) . This is one of the best tool that I have used for Performance measurement for an web application. It will give you the details of each and every individual control and images for single and multiple user along with network load.
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
Abhijit Jana wrote: RPT (Rational Performance Tester )
Thanks for suggesting the tool. I will also try it.
|
|
|
|
|
Amandeep Singh Bhullar wrote: Thanks for suggesting the tool. I will also try it.
That's great . But this is not free Tool . AFAIK , 30 day's Trial and you can test for 5 user Load in this Trial Edition . Please Confirm.
cheers,
Abhijit
CodeProject.Com MVP
|
|
|
|
|
I will search for Torrent
|
|
|
|
|
Thx for suggestion for all, i used firebug addone thats gave lots of information
thanx again.
|
|
|
|
|
i m writing an text to an image and creating it as an image, i want to give shading to that text while writing that. can any one help me please?
|
|
|
|
|
You can try using "Imprint MT Shadow" font.
|
|
|
|