|
There are quite a few common examples of regular expression validators or custom validators for use with JavaScript and ASP or ASP.NET that you might find with a few minutes of searching using google or something; for a clear definition of what constitutes a valid email address, you'll have to find the RFC on that subject.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
Hi everybody
I have a page with an asp repeater that consists of a list of radio buttons. I am using javascript in order to find the radio button that was checked. Everything works fine in IE but when I try it in NN 7.1 the following piece of code will produce an error.
if (browser == "N")
OnShipOptionChange(RadioButton_GetSelectedNN(window.document.getElementById("<%=m_methodid.UniqueID%>"))); <--this called
else
OnShipOptionChange(RadioButton_GetSelected(window.document.getElementById("<%=m_methodid.UniqueID%>")));
function RadioButton_GetSelectedNN(obj) <--the function called by the code above.
{
for(var idx = 0, max = obj.attributes.length; idx < max; idx++)
{
if(obj[idx].checked == true) <-- line that gives the error
return obj[idx];
}
return null;
}
The Error Message is: "obj[idx] has no properties". I have tried everything and I cannot make it to work. Any help will be highly appreciated. Thank you very much for your time
Spiros Prantalos
Miami the place to be!!
|
|
|
|
|
Hello,
When the user pushes a button, I would like to pop up a dialog box which asks them if they would like to continue or not. It the user chooses to continue, then the code on the server will run. I attempted to do this using the Javascript confirm() method. Here is my script:
<br />
function ConfirmDelete()<br />
{<br />
var msg = "Are you sure you want to delete the account?";<br />
if(confirm(msg))<br />
{<br />
<%DeleteAccount();%><br />
}<br />
}<br />
Here is the html:
<br />
<INPUT id="DelAcc" onclick="ConfirmDelete();" type="button" value="Delete Account" name="DelAcc"><br />
For some reason, the code in the ConfirmDelete function is being called immediately when the page loads (this includes the DeleteAccount server code), instead of just when the button is pushed. Is there something wrong with my code? Or, is there a different way to do this?
Thanks,
RC
|
|
|
|
|
If I put the following into <script> tags in the <head> section of a plain-ol' vanilla HTML page, like so:
<script>
function ConfirmDelete()
{
var msg = "Are you sure you want to delete the account?";
if(confirm(msg))
{
}
}
</script>
and the following in a plain HTML button:
<input type="button" id="blah" onClick="ConfirmDelete();" name="blah" value="Click">
...it works just fine, at least with IE6.x on W2K.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
By the way, the only way you can execute code stored in a server-side ASP function from a client-side JavaScript is to make the JavaScript post back to the server, either by posting a form or navigating to a URL with a query string.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
I think the reason my code was not working is because I was attempting to run server script from the client in the <%DeleteAccount()%> line of the code. I found a different way to make it work using the javascript doPostBack function.
Thanks for your input!
RC
|
|
|
|
|
Would like to display a map (image ie png, jpg file) then place Images (hotspots) on the map that drive mouseclick events. Would also like to add mouseover events for displaying hotspot info.
How do I put images on an image in web based project?
Is it possible to have an image then add image buttons to it dynamically?
Using webservices, c# in Visual Studio 2003
|
|
|
|
|
Look into creating HTML ImageMaps. It allows you to setup hotspots on images with URLs and tooltip info.
It won't do rollovers though, if you need to do that then you need to slice your image up. Or you can float an image (use CSS, position: absolute ) over with onmouseover/onmouseout events.
I recommend you use Macromedia Fireworks for either of these. It has an ImageMap/Hotspot tool as well as a image-slice tool which programmes in rollovers and the works.
regards,
Paul Watson
Bluegrass
South Africa
Christopher Duncan quoted:
"...that would require my explaining Einstein's Fear of Relatives"
Crikey! ain't life grand?
Einstein says...
|
|
|
|
|
I am trying to build the layout of my page without using TABLES.
I need to set the HEIGHT of a DIV element to 100% of its container. When I set it to 100%, I think that it takes the height of the BODY element and not its container's height..
Any ideas ?
Thank you
theJazzyBrain
Excelence is not an act, but a habbit Aristotle
|
|
|
|
|
It will take the height of it's container...so if BODY is your container it should take up the whole screen...
Test my theories and set the border: 1px solid black
Trial and error works best I find...
Cheers
How do I print my voice mail?
|
|
|
|
|
Well, it doesnt take the height of its container, thats what I though initially too.
<br />
<Body><br />
<div style="height:100%;"><br />
<div style="height:100px;">Some text here</div><br />
<div style="height:100%;">Some text here</div><br />
<div style="height:100px;">Some text here</div><br />
</div><br />
</body><br />
The above code will make my page to scroll... and I dont want it to scroll... any ideas?
theJazzyBrain
Excelence is not an act, but a habbit Aristotle
|
|
|
|
|
Actually, yes it does, but you have to nest the DIV's inside of other containers, and you can't have one that has 100% height along with two that have pixel height...
<div style="height:100%; border: 1px solid #000000">
<div style="height:100px; border: 1px solid #000000">Some text here
<div style="height:100%; border: 1px solid #000000">Some text here
<div style="height:100px; border: 1px solid #000000">Some text here </div>
</div>
</div>
</div>
|
|
|
|
|
ok... I see... So unless you specify the height of the container the DIV will expand to the height of the BODY if set to height:100%; ???..
So, what if (in your example) you want to have another DIV of height 100px at the bottom of the page while keeping the outermost DIV at 100% height?
What I am trying to do is to have a header DIV a footer DIV and a DIV in the middle that will expand to 100%.
theJazzyBrain
Excelence is not an act, but a habbit Aristotle
|
|
|
|
|
OK, the closest I could get to your goal is this:
<div style="height:100%; border: 1px solid #000000">
<div style="height:100px; border: 1px solid #000000">
</div>
<div style="height:75%; border: 1px solid #000000">
<p>Content Goes Here</p>
<p>Content Goes Here</p>
<p>Content Goes Here</p>
<p>Content Goes Here</p>
<p>Content Goes Here</p>
<p>Content Goes Here</p>
<p>Content Goes Here</p>
</div>
<div style="height:100px; border: 1px solid #000000">
</div>
</div>
Try it out and see if it works for you.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
I thought of that myself too...
So there is no way to do it properly without using TABLES, unless if I detect the size using JavaScript and the DOM and set it accordingly each time I load a page, refresh it or even when I resize the window...
theJazzyBrain
Excelence is not an act, but a habbit Aristotle
|
|
|
|
|
That's exactly what I was thinking while I was writing that last snippet.
p.s.: isn't it spelled "habit" not "habbit"?
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
Well,
I don't want to use client side sripting to set the layout of my page. For some reason I get the feeling that I should't do it...
It is disapointing though, I cannot understand why W3C didn't provide some way of doing this with CSS. They have been trying to encourage people not to use TABLEs for setting the layout of pages and use CSS instead. From what I can see they haven't provided a good alternative solution. To be fair though, you can do some good things with CSS, but still, you cannot do everything.
And yes its is habit... thanks!.;P
theJazzyBrain
Excelence is not an act, but a habit Aristotle
|
|
|
|
|
Tables are still my whole world... I only use CSS positioning when I create something that I know I will limit to fit inside of a browser window at maximized 800 X 600 resolution.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
Hi everyone
I've been developing a tab navigation lately using XML. Now I'm trying to
put all things together. I have 2 nested tabs.I would like to know what is
the best way to assembly when I click on a button on the tab the content
will appear below. There are mutiple ways out there, I would like to know
the most efficient way of your solution
Thanks
|
|
|
|
|
Use hidden DIVs and with JavaScript set them to show or hide as needed. Use the display: none; property rather than visibility: hidden; though as the former will then not take up any space.
regards,
Paul Watson
Bluegrass
South Africa
Christopher Duncan quoted:
"...that would require my explaining Einstein's Fear of Relatives"
Crikey! ain't life grand?
Einstein says...
|
|
|
|
|
I have done the same with TABLES and content for every TAB was included in a TR of the TABLE. Then set the DISPLAY style of each TR to either BLOCK or NONE.
If I was to do somehting like this again I would use DIVs instead as the other fellow CPian suggested...
theJazzyBrain
Excelence is not an act, but a habbit Aristotle
|
|
|
|
|
I do it by having named div elements with style="display:none" or style="display:block" as appropriate.
You will put all the tab stuff inside the divs
Enjoy
|
|
|
|
|
Hello
this is sam, and I have a big problem with ASP !!!!
I want to retrieve data from a database and then send this data to a url as a query string.
ex: http://77.125.192.120:1428/Recieve.asp?tel=20123335357&Msg=Misssshhhhh%20this%20is%20this?&CC=20&user=SMS&pass=Ed3kWKad&enc=1
enc:
Encoding: if message is ucs2 =0;
if message is plain Text =1
and if the Msg is in arabic so it is encoded and then sent.
Please help me with this. how can i do it in VBScript, ADO ?
I want the application to be run without stopping, to send data to the url without stopping. any new data comes, is sent to the url directly.
yours
sam.
Sam2004
|
|
|
|
|
Since it seems like you are using "Classic" ASP and ADO, the solutions is something like the following:
Dim httpRequest, url, response, request
url = "http://www.mydomain.com/mypage.asp"
Set httpRequest = Server.CreateObject("WinHttp.WinHttpRequest.5")
httpRequest.Open "PUT", url, False
' declaring and opening a new connection and recordset omitted
Do While Not rs.EOF()
request = "myvar1=" & rs("field1") & "&myvar2=" & rs("field2")
httpRequest.Send request
response = HttpReq.ResponseText
rs.MoveNext()
Loop
Of course, if you were using the .NET Framework, you could use HttpWebResponse and HttpWebRequest to do the same thing.
You can look up "WinHTTP Interfaces" on MSDN for more information.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
Hi,
I am having a weird problem which I suspect is a bug in the framework or VS.NET. Maybe some of you know how to fix this.
I have a project containing one .ASMX file and three datasets. However, when I fetch the XML schema of the webservice, only 2 of the 3 datasets show up!
The dataset that doesn't show up in the schema is the one I added last. I hear you... yes I did recompile, MANY times. I rebooted, restarted IIS. It keeps returning the schema of only the first 2 datasets.
Anyone has an idea of what the problem might be? I had a similar problem a few weeks ago... the schema always returned an OLD version of my dataset.
Your help is very much appreciated.
Thanks!
Carl
|
|
|
|