|
|
Whats the role of AJAX in web development? Can anyone explain?
|
|
|
|
|
The literal meaning of AJAX is Asynchronous JavaScript And XML. Practically, it's used to refer to any sort of asynchronous communication between client-side script on a web page and a server (not only those involving XML). The "Asynchronous JavaScript" bit is key, as its role is in applications where it is desirable to allow the user to perform one or more actions without waiting for a response from the web server. Examples:
- Populating or validating form fields while the user is busy filling in other fields.
- Loading and displaying search results while the user is typing in a query.
- Saving changes to one piece of data while the user is examining or modifying other pieces of data.
---- You're right.
These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets .
|
|
|
|
|
When a user puts and address in the address bar, the browser calls the server, the server generates content, and the browser displays it. Traditionally, once the server delivers content, that content will not change unless another server call is made. This means that if realtime values are changing, the webpage will displays the same values until the page is refreshed.
AJAX is simply a Javascript xmlHttp function that make servers calls and changes page content by the browser. This means the page content can change without having to submit a form or refresh the page. Consider this page-
http://www.time.gov/timezone.cgi?Eastern/d/-5/java[^]
The page loads once, but the clock field continually changes every second. This would be an AJAX script that calls another page that dynamically generates the time right now. If Javascript calls for this function every second, it appears to change like a realtime clock.
Professional Services Specialist
rviswakumar@hostmysite.com
HostMySite.com[^]
|
|
|
|
|
Hello!
I have a page from which the user can export data. This can take quite a while if alof of data is to be exported. I have tried showing a loading animation(.gif) while the user waits, but to no avail.
I got it working in firefox by appending a gif-image to the page using javascript when user clicks submit-button, but in IE the gif-image shows fine but doesnt move.
Anyone got an idea how to achieve this?
|
|
|
|
|
The easiest way to do this is to start sending the server response immediately - just the start of a document with progress indicator - and not finish the response until your task is complete. The downside of this technique is two-fold: you're limited in how long you can keep a connection open, and you're keeping a connection open the entire time; if you expect more than a handful of simultaneous users, this will kill your server.
More efficient techniques can make use of AJAX, META-refresh, or script-driven postback. CP has a number of articles on the subject[^].
---- You're right.
These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets .
|
|
|
|
|
|
I want to highlight text in textbox on focus of it.
I have called textbox.select().
The problem after execution of textbox.select() is, cursor can only move to begining of the text or to the end of text in textbox.
It is not going through the characters which are in the middle.
Cursor directly jump to begining or end character in the textbox when moved.
Can somebody suggest the solution over this (I am doing all this stuff in javascript, so javascript solution is most welcome).
Thank you.
Ashish
Software Engineer, Pune
|
|
|
|
|
I take it then that you do not actually wish the text in the textbox to be selected, as the behavior of the cursor with regard to selected text is plaform- and browser- dependant.
So just change the background and text color of the textbox:
var textbox = document.getElementById("textbox");
textbox.style.backgroundColor = "blue";
textbox.style.color = "white"; ...etc.
---- You're right.
These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets .
|
|
|
|
|
I have a form on my site that takes client information for a sale on the first page (name, email, address, etc.), then calls the 2nd page (Enter Credit Card Information) then sends all the information to a shopping cart. I would like to capture the first page information and send it at the same time to another database for our Customer Service Reps. Is this possible?
thanx for any help
cobyco
|
|
|
|
|
cobyxm wrote: Is this possible?
Yes
|
|
|
|
|
|
You can read this[^].
Pay special attention to sessionvariables.
It's after ArrayList: The Super, Handy-Dandy, Array-Type Thingy
|
|
|
|
|
I have this report built using ASP in 2000.
We did some modifications few months ago and was running fine.
Now, all on a sudden it's giving
error '80020009'.
Any ideas?
Thanks.
|
|
|
|
|
|
Well I definitely did before posting for help.
Looks like there could be an array of reasons for the problem, including spywares etc. (don't have any)
I tested more and found if there is a lot of data - thats when Im getting it. If less data - report is still working.
|
|
|
|
|
WHAT THE HELL DAVE! I suppose that's been around for like ever and I am just now finding out?
LMAO
|
|
|
|
|
Not really.
As I mentioned - it was working for maximum amount of data possible in this case. Now - it works for small amount of data, not otherwise. The only thing I know of is a windows update couple of weeks ago.
Any fruitful ideas?
|
|
|
|
|
That's been around for at least a few months, that I know of anyway. I thought it was a pretty cool idea myself.
|
|
|
|
|
Dave Kreskowiak wrote: I thought it was a pretty cool idea myself.
Used twice already today!
|
|
|
|
|
I am developing an application to post photo details to shutterfly for printing the digibug code works okay but the shutterfly code just doesn't work.if anybody knows how to do the shutterfly post your help will be highly appreciated.Also does any body know how to do the walgreen and walmart posts
Imports System
Imports System.Web
Imports System.Data
Imports System.Data.SqlClient
Partial Public Class ChoosePrinter
Inherits System.Web.UI.Page
Private ReadOnly digibugInfo As String = _
"<form action=""http://www.digibug.com/dapi/order.php"" method=""post"">" & _
"<input type=""hidden"" name=""digibug_api_version"" value=""100"">" & _
"<input type=""hidden"" name=""company_id"" value=""3376"">" & _
"<input type=""hidden"" name=""event_id"" value=""8973"">" & _
"<input type=""hidden"" name=""cmd"" value=""addimg"">" & _
"<input type=""hidden"" name=""return_url"" value=""%RETURN_URL%"">" & _
"<input type=""hidden"" name=""num_images"" value=""1"">" & _
"<input type=""hidden"" name=""image_1"" value=""%IMG_URL%"">" & _
"<input type=""hidden"" name=""image_height_1"" value=""%IMG_HEIGHT%"">" & _
"<input type=""hidden"" name=""image_width_1"" value=""%IMG_WIDTH%"">" & _
"</form>"
Private ReadOnly shutterflyinfo As String = _
"<form action=""http://www.shutterfly.com/c4p/UpdateCart.jsp"" method=""post"">" & _
"<input type=""hidden"" name=""addim"" value=""1""> " & _
"<input type=""hidden"" name=""protocol"" value=""SFP,100"">" & _
"<input type=""hidden"" name=""pid"" value=""C4P"">" & _
"<input type=""hidden"" name=""psid"" value=""AFFL"">" & _
"<input type=""hidden"" name=""imnum"" value=""1"">" & _
"<input type=""hidden"" name=""imraw-1"" value=""%IMG_URL%"">" & _
"<input type=""hidden"" name=""imrawheight-1"" value=""%IMG_HEIGHT%"">" & _
"<input type=""hidden"" name=""imrawwidth-1"" value=""%IMG_WIDTH%"">" & _
"<input type=""hidden"" name=""imthumb-1"" value=""%IMG_THUMBURL%"">" & _
"<input type=""hidden"" name=""returl"" value=""%RETURN_URL%"">" & _
"</form> "
Private intid As Integer
Private digibug As String
Private shutterfly As String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim fotoid As String = Request.QueryString.Item("id")
intid = CInt(fotoid)
Me.GetPhotosFromQueryString(intid)
Dim foto As Fotos = New Fotos(intid)
Me.printimage.ImageUrl = "GetFoto.aspx?id=" + foto.FotoID.ToString()
Me.Image1.Visible = False
Me.Image1.ImageUrl = "GenerateThumbs.aspx?id=" & foto.FotoID
Dim db As New DbObject()
Dim parms As SqlParameter() = { _
New SqlParameter("@FotoID", foto.FotoID)}
Dim dr As SqlDataReader = db.RunProcedure("sp_Foto_GetLoc", parms)
If dr.Read() Then
Dim b As New Bitmap(dr.GetString(dr.GetOrdinal("FotoLoc")))
digibug = digibugInfo
digibug = digibug.Replace("%RETURN_URL%", Request.Url.ToString())
digibug = digibug.Replace("%IMG_URL%", "http://www.photoamigo.com/GetFoto.aspx?max=4096&id=" & foto.FotoID)
digibug = digibug.Replace("%IMG_HEIGHT%", b.Height.ToString())
digibug = digibug.Replace("%IMG_WIDTH%", b.Width.ToString())
shutterfly = shutterflyinfo
shutterfly = shutterfly.Replace("%RETURN_URL%", Request.Url.ToString())
shutterfly = shutterfly.Replace("%IMG_URL%", "http://www.photoamigo.com/GetFoto.aspx?max=4096&id=" & foto.FotoID)
shutterfly = shutterfly.Replace("%IMG_HEIGHT%", b.Height.ToString())
shutterfly = shutterfly.Replace("%IMG_WIDTH%", b.Width.ToString())
shutterfly = shutterfly.Replace("%IMG_THUMBURL%", "http://www.photoamigo.com/GenerateThumbs.aspx?id=" & foto.FotoID)
Me.linkbtndibug.Visible = False
Me.linkbtnshutterfly.Visible = False
End If
End Sub
Protected Sub GetPhotosFromQueryString(ByVal id As Integer)
Dim foto As New Fotos(id)
Dim fotolocation As String = "GenerateThumbs.aspx?id=" & foto.FotoID.ToString()
Dim usr As New User(foto.UserID)
Dim navigateurl As String = String.Format(ConfigurationSettings.AppSettings("UserHomePage"), _
usr.strUserName) & "?id=" & foto.FotoID.ToString()
Me.InsertPhotosInCache(fotolocation, navigateurl)
End Sub
Protected Sub InsertPhotosInCache(ByVal key As String, ByVal value As String)
If CacheManager.FotoCache(key) Is Nothing Then
CacheManager.FotoCache.Insert(key, value, Nothing, DateTime.MaxValue, TimeSpan.FromMinutes(10))
Else
CacheManager.PurgeCache(key)
End If
End Sub
Protected Sub Index_Changed(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles printer.SelectedIndexChanged
Me.PostValues()
End Sub
Private Sub PostValues()
Select Case printer.SelectedItem.Text
Case "DigiBug"
Me.linkbtndibug.Visible = True
Case "ShutterFly"
Me.linkbtnshutterfly.Visible = True
Me.Image1.Visible = True
End Select
End Sub
End Class
|
|
|
|
|
The first release candidate for Internet Explorer 8 has been released to the web. You can download it from Internet Explorer 8: Worldwide sites[^].
I've checked out lots of sites about Internet Explorer 8. And here's my picks of the fastest way to learn about it.
Here's where you can find out about the features your users will care about, Windows Internet Explorer 8 Release Candidate 1 Fact Sheet[^].
To find out about the features that you'll be interested in, see the Developer Checklist [^] for compatibility testing, ActiveX developers and WebOC hosts, AJAX developers, Toolbar developers, and layout developers.
Or to learn about how you can differentiate your site, see Powerful New Developer Features[^]. You'll find information there about Accelerators, WebSlices, CSS 2.1 Compliance, better JSON support, DOM improvements, developer tools that are baked in, and accessiblilty.
Release notes on upgrading are at Upgrading to Internet Explorer Release Candidate[^]
|
|
|
|
|
|
dadashri wrote: hi i heav videomail
I don't believe you. Prove it!
|
|
|
|
|
and I have a red pencil box.
|
|
|
|