|
Ok thanks the code above worked, but how do I unhide a hidden div at the same time, ive tried the folloiwng but it says error object required:
Button1.Attributes.Add("onmouseover", "javascript:document.getElementById('div5').style.display = 'none';javascript:document.getElementById('Div2').style.display = 'inline';");
thanks!
|
|
|
|
|
Ok - You need to put all those in a JS function and call that function from the event. Something like
function ChangeDisplay(){
document.getElementById('div5').style.display = 'none';
document.getElementById('Div2').style.display = 'block';
}
Button1.Attributes.Add("onmouseover", "ChangeDisplay();");
|
|
|
|
|
fixed it, I had the visibility set in the c# so had to disable that
cheers for all the help!
|
|
|
|
|
.netman wrote: cheers for all the help!
Cheers !
|
|
|
|
|
Response.Write("<td><img style="CURSOR: pointer" id="image" onclick="javascript:openPopUp('" & lsimagename & "')' alt="" src="" & lsimagename & "" width="100">")"
and my java function is
function openPopUp(var imgnames)
I am using above code to display a popup window. it not working properly when passing a "lsimagename" as argument, but if i removed the argument it working properly (popup is displaying). when passing the argument popup not displaying. what is the problem
pls kindly help me
thanks in advance
modified on Thursday, May 1, 2008 11:56 PM
<div class="ForumMod">modified on Friday, May 2, 2008 12:00 AM</div>
|
|
|
|
|
I don't know if your code got screwed up when you pasted it into the window, but first of all, it looks like you aren't closing the parenthesis ")" when you call openPopUp. If that is not the problem, maybe you could post what the output looks like when you view the source in the web browser since that will most likely clue us into the problem - the server-side code doesn't tell us anything because we don't know what the end result is.
|
|
|
|
|
Hi
How to Restrict User To Click Back and Next Button on Browser
I dont want user to navigate the pages ..by using next and back button...
How to Do this ..?
A little bit of code or example will be like Bread with Extra cheese
Thank You
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
|
|
|
|
|
Not possible. I suggest reading a book on what ASP.NET is and what it does. It's an engine for generating HTML. You can do some browser tricks that make it seem like the back button doesn't work, but you can easily side step those, as a user, by using the drop arrow or clicking twice real fast. Instead of trying to stop users from using basic browser functionality, you should fix your design so that it doesn't bother you if they do.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Say from Page1 user comes to page2
and if one wants to restrict the user from going back to page1
then within Page1 on the
Body onload event
write "history.go(1)"
which would not let the user come back to page1 from page2.
Hope this work.
|
|
|
|
|
Kartik Rathi wrote: Body onload event
write "history.go(1)"
which would not let the user come back to page1 from page2.
Poor design and less reliable too
|
|
|
|
|
Please tell me how to do it using coding ....
example : i dont want user to run a authuser.aspx unless an until he/she is authenticated user
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
ALT + F4 wrote: i dont want user to run a authuser.aspx unless an until he/she is authenticated user
OK, so now we're talking about your specific problem, instead of an impossible solution.
If you impliment your login properly, this won't happen. The way I do this, is to store a value in the session telling me the user is logged in, and I delete it when they log out. Most people do this, but they miss the next step. I create a base page, which all my secure pages derive from. This base class checks if the user is logged in, and if not, redirects to the login page.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi all i have a strange issue,my site save cookies when someone visit site and click on a specific button, it was working fine on IE6 and IE7, now it works fine on IE7 but not IE6, dont know what the issue is not exception is raised as well, but still cookie is not saved when i view on cookies folders,is that need some thing with user privilages or anything else dont know what is missing i have checked the privacy settings but still now working in IE6 even i have set on level to accept all cookies
Regards.
Tasleem Arif
|
|
|
|
|
_tasleem wrote: cookie is not saved when i view on cookies folders
Did the Request.Cookies collection in the same website show up your cookies? I believe, session cookies might not appear in the folder. Isn't it?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
can u explain in detail.
this cookie is generated in some system in IE7 and on some systems it is not generated. here is the code of that
HttpCookie aCookie = new HttpCookie("SCID"); <br />
aCookie.Values[strCVal] = strCVal; aCookie.Expires = DateTime.Now.AddMinutes(5); <br />
Response.Cookies.Add(aCookie);<br />
Regards.
Tasleem Arif
|
|
|
|
|
i want these cookies in cookie folder, bcos its important for me.
Regards.
Tasleem Arif
|
|
|
|
|
_tasleem wrote: cookie folder
In that case, you might be dealing with persistent cookies. Are you setting the Expires and Path attributes properly?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hi,
whenever user enter text in a textbox have to disable button and if user removes text from textbox should enable button. How can we implement on client side using javascript.? I tried with onkeypress and onkeydown. but when ever I press key it is not capturing keyvalue. Can anyone help me?
pls see the below code.
function disablebutton()
{
debugger;
var prefix = 'ctl00_ContentPlaceHolder1_';
var btnRecharge = document.getElementById(prefix +'btnRecharge');
var txtpromo = document.getElementById(prefix +'txtBonusPromo');
if(txtpromo.value =='')
{
btnRecharge.disabled = false;
}
else
{
btnRecharge.disabled= true;
}
}
Thanks
|
|
|
|
|
chakran wrote: 'ctl00_ContentPlaceHolder1_
This is a bad practice. Try getting the actual generated Id from the .ClientID property from codebehind.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Ok. the problem is when ever I press key first time the button is not disabled. If i enter 2nd character this time the button is disabled. the problem is it is not capturing the letter what I pressed at that moment.
The same problem occur when am trying to delete using backspace. I deleted all the characters from textbox, then button is not enabled. when I press backspace again eventhough no characters in textbox, this time button is enabling..
main problem is when ever I press key it is not capturing at that moment..
Thanks,
|
|
|
|
|
there doesn`t seems prob with ur code...I haven`t tried but try using onkeyup....BTW use clientID instead on generating ID`s on the fly.
When you fail to plan, you are planning to fail.
|
|
|
|
|
Hi,
onkeyUp is working perfectly. thanks for your reply.
|
|
|
|
|
Protected Sub GridView1_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView1.RowUpdating
Try
Dim t As TextBox
t = CType(GridView1.Rows(e.RowIndex).FindControl("reqno"),
TextBox)
reqno = t.Text
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
i am getting error -- Object reference not set to an instance of an object.
|
|
|
|
|
Dim t As New TextBox<br />
t = CType(GridView1.Rows(e.RowIndex).FindControl("reqno"), TextBox)<br />
reqno = t.Text
I Love T-SQL
|
|
|
|
|
No change with that code also dude...
|
|
|
|