|
It works well. Thank you very much.
Jane
|
|
|
|
|
Hi I have a problem that refers to dubbelclick on a button.
I want to prevent the server code to run again after a second postback.
I can not solve this with javascript because my clients doesn't always allow javacript.
I know that a thread on the server doesn't die because of a second postback while the first thread is running but the connection to the client doesn't seemes to work for the first thread after a second postback.
Often this isn't a problem but I want to redirect the client to a new page after saving data to the database.
I created a function to see if it is a second postback or not so that is not my problem.
I think the answer is in the threads.
If you have any Idea or question please tell me.
Thanx!
-- modified at 8:56 Tuesday 18th April, 2006
|
|
|
|
|
The only way to do this is with Javascript - by disabling the button after the first click.
You could also add a message kindly asking users not to double press the submit/save button for those that have JS switched off.
|
|
|
|
|
There must be a way.
You can not trust a user to follow directions. If they click more then once the data will be stored twice.
I can with cash and a hiddenfield check if it is a second click on the button during the first postback but I somehow lose the connection to the client with the first thread.
I have done two different test and sometimes it is the same thread that executes the code on the server side for both postbacks. I don't know why. If it is the same thread then it's easy but not if it is different threads.
Do you know why it is different threads sometimes?
How can I get hold of the first thread and merge it with the second.
Thanx!
|
|
|
|
|
Store on server the time of last data submit. When user submitting form you can calculate difference between current time and last submit time. If this difference is less than 1 second, you must ignore this submit.
Best regards, Alexey.
|
|
|
|
|
That is almost how I did it but thats not my problem.
My problem is that the first postback don't have the connection to the client if a second postback occures.
Lets say that I have to store some data in my database and then I get an Id back from the database and I have to use that in a response.redirect. If there is two postbacks then the first one with the response.redirect will not do anything because the second postback is the one with the connection to the client.
It doen't matter if I don't do any thing with the second postback it is stil the one with the connection to the client.
I think the solution is to merger the threads or something but I don't know how.
Thanx for your answers!
|
|
|
|
|
Hello, I have a WebService where I have added som methods, when I try to update the excisting WebService by just copying the new files into the folder only the old methods work.
If I brows the asmx file in the IIS the new methods are in the list, but if I invoke a new method a page shows with a yellow bar at the top saying "Youre security settings do not allow Web sites to use ActiveX controls installed on youre computer......."
It seems to me that the webservice is using som old DLL files stored some where on the server.
Anybody with any idees to where these dll files may be located?
Spaz
-- modified at 10:12 Tuesday 18th April, 2006
|
|
|
|
|
Hi all,
I have this script where i generate DIVs dynamically and put them one under another by setting their style.top property.
Now when i add any thing to the top most positioned DIV and increase its height, it expands and overlaps the DIV below.
Is there anyway, in which i can make these DIVs like normally generated DIVs, so that they push down other DIVs when their height is increased.
Or is there a workaround for this problem.
Thanks in advance.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
Try using "z-index" CSS property.
Best regards, Alexey.
|
|
|
|
|
Can you please explain a bit more as to what z-index property exactly does and how its presence impacts surrounding elements ??
Thanks in advance.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
|
CoolASL wrote: and how its presence impacts surrounding elements
It does not.
---
b { font-weight: normal; }
|
|
|
|
|
If you position them absolutely there is no way that they can adjust to the size of other elements. Just put them in the normal flow of the page.
---
b { font-weight: normal; }
|
|
|
|
|
Hi Guffa,
Thanks for coming to my rescue again.
It would really be nice if i could put the DIVs in the normal flow of the page. But since i am required to generate them dynamically, it is not possible to do so.
Ok, to tell you the actual thing, i am actually writing a script to display a Dynamic Tree View. I know there are quite a number of such free sources, but i wish to do it on my own so that i can have the display my way.
According to my code, when a user clicks on a + sign,
1) The sub-directories are retrieved from the database using AJAX.
2) DIVs are created dynamically and initialized properly
3) The DIVs are embedded inside the parent DIV using appendChild and the height of the parent is increased to accomodate the newly created DIVs.
I have to use
overflow:hidden
property for all the DIVs because without that the generated DIVs fail to display themselves inside the parent DIV and they get displayed outside the parent DIV on the main page.
Now, since the parent DIV has been created in the normal flow, when they expand, they push down the other DIVs under them. But the ones generated by me, fail to do so and overwrite on the ones below.
I hope i was able to explain you my logic.
Is my logic ok, or is there a better way of doing this thing.
I have not tried, but i feel that i should alter the innerHTML of the parent DIV to add the newly created DIVs.
Please help me out.
Thanks in advance.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
CoolASL wrote: It would really be nice if i could put the DIVs in the normal flow of the page. But since i am required to generate them dynamically, it is not possible to do so.
Yes, it is. You can dynamically add elements into the page, and it will reflow to accomodate the new elements.
I have to use overflow:hidden property for all the DIVs because without that the generated DIVs fail to display themselves inside the parent DIV and they get displayed outside the parent DIV on the main page.
That sounds like a strange workaround. Is that because you are positioning the elements absolutely instead of actually placing them inside the parent element?
---
b { font-weight: normal; }
|
|
|
|
|
Hey thanks Guffa.
That really helped me out.
After reading yours and Shog's reply I set out again from scratch and found that i made a wrong assumption at one place. Which means that the initial research was defective...
Thanks for the help. I think i'll be able to continue from here.
Thanks a lot.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
CoolASL wrote: I have to use
overflow:hidden
property for all the DIVs because without that the generated DIVs fail to display themselves inside the parent DIV and they get displayed outside the parent DIV on the main page.
You're making this waaay too complex. I'm gonna make one major assumption, that you are not making the parent DIV absolutely positioned or fixing the height - if you are doing either of these, then stop it. With that out of the way, you should be able to add children and the parent DIV will automatically resize to contain them. No manual sizing or positioning required.
Last modified: Tuesday, April 18, 2006 10:02:10 PM -- spelling...
|
|
|
|
|
Hey thanks Shog.
That really helped me out.
After reading yours and Guffa's reply I set out again from scratch and found that i made a wrong assumption at one place. Which means that the initial research was defective...
Thanks for the help. I think i'll be able to continue from here.
Thanks a lot.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
Following is the requirement for search component:
Input:
Only 1 search box in which I will put 1 or more words(separated by space)
Output:
I need to search space separated parts of this string in multiple fields of multiple tables.
What I have done?
$keywordList = explode( ' ', trim($_REQUEST['txtSearch']) );
$i = 0;
while($i < count($keywordList)){
$strKeyword.= "
r.userId like '%$keywordList[$i]%'
or r.maritalStatus like '%$keywordList[$i]%'
or r.nativeLang like '%$keywordList[$i]%'
or ro.personalStatement like '%$keywordList[$i]%'
or ro.empReq like '%$keywordList[$i]%'
or ro.hobbies like '%$keywordList[$i]%'
";
$i++;
if($i < count($keywordList)){
$strKeyword.= " or ";
}
}
This is working according to my requirements
I need to do it in MySql and PHP with regexp.
Any Help?
Thanks
|
|
|
|
|
How can can write following code in Vbscript, as I tried this one in ASP, but not working, do not know why.
<html>
<head>
<script type="text/javascript">
function Validate(frm)
{
if (frm.id.value.length==0) {
alert('Invalid Id');
frm.id.focus();
return false;
}
if (frm.password.value.length==0) {
alert('Invalid Password');
frm.password.focus();
return false;
}
return true;
}
</script>
</head>
<body>
<form onsubmit="return Validate(this);" action="service.asp">
ID: <input type="text" name="id"><br>
Password: <input type="password" name="password"><br>
<input type="submit">
</form>
</body>
</html>
Every thing will come to you if you have faith.
-- modified at 22:00 Tuesday 9th May, 2006
|
|
|
|
|
Standard question #1:
What do you mean by "not working"?
---
b { font-weight: normal; }
|
|
|
|
|
There is no such form property as "removed"... try replacing that with "onSubmit"...
cheers
Phil
|
|
|
|
|
Phil Uribe wrote: There is no such form property as "removed"...
Yes, this forum replaces "onclick" near "=" to "removed="
try post this:
onclick=
Best regards, Alexey.
|
|
|
|
|
Use onsubmit instead of onclick.
---
b { font-weight: normal; }
|
|
|
|
|
How would I generate config and hbm files using tools? could any one let me know the tools?
prasen
|
|
|
|