Click here to Skip to main content
15,896,606 members
Home / Discussions / Web Development
   

Web Development

 
QuestionSpell Check in asp Pin
AashishSingh19-Jan-06 23:39
professionalAashishSingh19-Jan-06 23:39 
AnswerRe: Spell Check in asp Pin
tarasn22-Jan-06 23:58
tarasn22-Jan-06 23:58 
Questionurget. enctype="multipart/form-data" Pin
Harikrk19-Jan-06 21:58
Harikrk19-Jan-06 21:58 
AnswerRe: urget. enctype="multipart/form-data" Pin
Guffa20-Jan-06 6:59
Guffa20-Jan-06 6:59 
GeneralRe: urget. enctype="multipart/form-data" Pin
Harikrk21-Jan-06 6:50
Harikrk21-Jan-06 6:50 
AnswerRe: urget. enctype="multipart/form-data" Pin
Guffa21-Jan-06 10:19
Guffa21-Jan-06 10:19 
GeneralRe: urget. enctype="multipart/form-data" Pin
Harikrk22-Jan-06 20:20
Harikrk22-Jan-06 20:20 
Questionjavascript Waiting for a user to click on something? Pin
FruitBatInShades19-Jan-06 21:01
FruitBatInShades19-Jan-06 21:01 
I am not normally a javascript developer Roll eyes | :rolleyes: but am trying to write the client side script for a message box. Don't ask why I'm doing it this way, but can you help me?

My page calls a single function to validate the page. At which point I need to display a div and wait for the user to click on a button before I return true/false. I would normally use an event but I don;t know javascript Frown | :(

I know about the javscript messagebox but that is not what I am trying to achieve. I am wanting to display a div with its content and wait for a click. I do not call mbValidate, the system does.

The problem is that I need to change the display of the div when mbValidate is called but not leave that function till an option has been picked. Picture the problem.

1. System calls mbValidate
2. Need to show the div so the user can see it
3. Wait until the user has clicked on one of the options in that div. (Result in true/false)
4. return the clicked option from mbValidate

So I need to enter some loop in mbValidate until one of the options is selected.

<javascript>
function mbClick(caption)
{
if (caption= == "OK")
{
return true;
}
else
{
return false;
}
}

function mbValidate
{
/* show div and wait for reply */
control = dom_getElementByID('MessageBox');
control.style.display = "block";

//Message box should now be visible

wait for button click from mbClick //How?

//Hide message box div
control.style.display = "none";
//return result
return IsValid; //How to populate this?
}
</javascript>

<div id=MessageBox>
I am a message box, honest<br/>
<div onClick="javascript:mbClick('OK')"> OK </div>
<div onClick="javascript:mbClick('Cancel')"> Cancel </div>
</div>

Definitely a PEBCAK! (Problem Exists Between Keyboard And Chair)<BR><A href='http://www.fruitbatinshades.com' Target='_blank'>www.FruitBatInShades.com</a>
AnswerRe: &#x6a;avascript Waiting for a user to click on something? Pin
Guffa21-Jan-06 10:25
Guffa21-Jan-06 10:25 
QuestionWeb Scraping in asp Pin
rubal_pal19-Jan-06 19:13
rubal_pal19-Jan-06 19:13 
AnswerRe: Web Scraping in asp Pin
legalAlien24-Jan-06 2:06
legalAlien24-Jan-06 2:06 
QuestionMaintaining same text-size on web page? Pin
pankazmittal19-Jan-06 11:01
pankazmittal19-Jan-06 11:01 
AnswerRe: Maintaining same text-size on web page? Pin
Guffa19-Jan-06 13:02
Guffa19-Jan-06 13:02 
QuestionXmlDataSource? Pin
eng_Hosam Kamel19-Jan-06 7:39
eng_Hosam Kamel19-Jan-06 7:39 
QuestionMicrosoft Online MSDN Menu Pin
Brendan Vogt19-Jan-06 1:49
Brendan Vogt19-Jan-06 1:49 
QuestionLabel Printing Pin
cberam19-Jan-06 0:50
cberam19-Jan-06 0:50 
QuestionASPNETDB.MDF Pin
m_amin8318-Jan-06 22:42
m_amin8318-Jan-06 22:42 
QuestionOne .js file or many? Pin
RX Maverick18-Jan-06 13:20
RX Maverick18-Jan-06 13:20 
AnswerRe: One .js file or many? Pin
Guffa18-Jan-06 13:52
Guffa18-Jan-06 13:52 
AnswerRe: One .js file or many? Pin
Colin Angus Mackay18-Jan-06 22:56
Colin Angus Mackay18-Jan-06 22:56 
QuestionCopy Web feature in VS2005 fails... Pin
Jesse Evans18-Jan-06 8:41
Jesse Evans18-Jan-06 8:41 
Questiontop.location.href from an Iframe Pin
xaphod18-Jan-06 8:06
xaphod18-Jan-06 8:06 
AnswerRe: top.location.href from an Iframe Pin
Guffa18-Jan-06 11:19
Guffa18-Jan-06 11:19 
GeneralRe: top.location.href from an Iframe Pin
xaphod18-Jan-06 12:50
xaphod18-Jan-06 12:50 
AnswerRe: top.location.href from an Iframe Pin
Guffa18-Jan-06 13:54
Guffa18-Jan-06 13:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.