473,289 Members | 1,839 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

use javascript without postback

Hi All
I have a page in which i using user control .on user control i using
javascript to pop up a message .when i choose wrong date in user
control & submits the page it alerts the message of javascript but
page refrehes. I want to use javascript without page refresh or without
postback .
Is this possible to use javascript without page postback..
Thanks in advance
Vinay

Aug 31 '06 #1
3 5563
Sym
vinay wrote:
Hi All
I have a page in which i using user control .on user control i using
javascript to pop up a message .when i choose wrong date in user
control & submits the page it alerts the message of javascript but
page refrehes. I want to use javascript without page refresh or without
postback .
Is this possible to use javascript without page postback..
Thanks in advance
Vinay
You mention control and postbacks, are you producing the page via asp ?

Javascript can validate data on the page, but if anything is to be done
on the server you have to resubmit/postback or use say ajax. Also if
the control is server side and you have a change etc event associated
with it, it will do a postback.

I am not sure i can help more without some html/javascript examples of
your problem tho.
rgds
Symeon.

Aug 31 '06 #2
Sym
vinay wrote:
Hi All
I have a page in which i using user control .on user control i using
javascript to pop up a message .when i choose wrong date in user
control & submits the page it alerts the message of javascript but
page refrehes. I want to use javascript without page refresh or without
postback .
Is this possible to use javascript without page postback..
Thanks in advance
Vinay
You mention control and postbacks, are you producing the page via
asp.net ?

Javascript can validate data on the page, but if anything is to be done
on the server you have to resubmit/postback or use say ajax. Also if
the control is server side and you have a change etc event associated
with it, it will do a postback.

I am not sure i can help more without some html/javascript examples of
your problem tho.
rgds
Symeon.

Aug 31 '06 #3

vinay wrote:
Hi All
I have a page in which i using user control .on user control i using
javascript to pop up a message .when i choose wrong date in user
control & submits the page it alerts the message of javascript but
page refrehes. I want to use javascript without page refresh or without
postback .
Is this possible to use javascript without page postback..
Thanks in advance
Vinay
Yes. It sounds like you are doing a form validation, however on
invalid entry, you are failing to stop the form submission. In that
case, you can do something like the following:

html:

<form onsubmit = "return validateForm(this)">
....your form elements...
<input type = "text" name = "userdate">
</form>

javascript:

function validateForm(myForm)
{
/*your validation routine
Aug 31 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Mark Fox | last post by:
Hello, I am attempting to do something very simple. I have a page MainPage.aspx and a popup window Popup.aspx. When users click on the linkbutton in the popup window I am looking to do some...
5
by: Allan M. | last post by:
I have a series of select boxes that must be populated client side, because they interact with each other. The design specification calls for these boxes to be updated without having to make a...
21
by: Martin Eyles | last post by:
I am trying to get javascript to cause a page to post back. I have tried calling _doPostBack from my script, but generates an error "object expected". I think this is because the page's script...
6
by: domtam | last post by:
First of all, my ASP.NET application has to support browser with Javascript disabled. In the application There is a control that looks like a text hyperlink, but the server-side has to do...
3
by: Alfonso | last post by:
Hi: I have done a page using Asp.net with a searcher and a contact form. My problem is that it must work in navigators without javascript, and when I run de web in those navigators I have no...
2
by: Alan Silver | last post by:
Hello, I have just discovered that if you turn off Javascript, then cross-page posting does not work. The postback goes to the originating page, which basically means that nothing happens. I...
8
by: Deft.Jab | last post by:
This problem only exists in IE, due to UI restrictions I'm using a href in an error label to bring up a modal popup. I'm using a callback to filter a grid on the popup. The problem: The href...
4
by: Peter | last post by:
ASP.NET I have an application which use ASP.NET Autocomplete extender which works great. But I have a question how to update all the fields on the screen using Ajax. Users starts typing in a...
2
Frinavale
by: Frinavale | last post by:
JavaScript in ASP.NET Using JavaScript in ASP.NET pages can make your application seem to work faster and prevent unnecessary calls to the server. JavaScript can be used to perform client-side...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.