473,397 Members | 2,028 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,397 software developers and data experts.

AJAXing newbeee question. POSSIBLE or IMPOSSIBLE ?

Mel
Is there a way of restricting operations such as links, buttons etc. to
within the <DIV> only ?

Let me clarify the problem a little.

I am doing an AJAX like operation inside a DIV. I do a server trip
without refreshing the page and get new HTML code that includes links
forms etc back from server. I need to confine operations within this
DIV without refreshing the whole page without using IFRAME.

Am i asking the right question or is there a known solution to such
problems
thanks for your help

Jun 22 '06 #1
3 1317
Mel wrote:
Is there a way of restricting operations such as links, buttons etc.
to within the <DIV> only ?

Let me clarify the problem a little.

I am doing an AJAX like operation inside a DIV. I do a server trip
without refreshing the page and get new HTML code that includes links
forms etc back from server. I need to confine operations within this
DIV without refreshing the whole page without using IFRAME.

Am i asking the right question or is there a known solution to such
problems

Your question is a little bit confusing...

Are you asking if it is possible to use your AJAX response-data
to update only the content of a specific div element, and not the
whole page?

If so, the answer is yes.

If your AJAX call ie. return some html-fragment, and you want a
specific div element to be updated to show this, do something like this

<div id="updateDiv">
....
</div>

....

function ajaxResponse() {
....

var updtDiv = document.getElementById("updateDiv");
updtDiv .innerHTML = xmlHttpObj.responseText;
....
}

--
Dag.
Jun 22 '06 #2
Mel

Dag Sunde wrote:
Mel wrote:
Is there a way of restricting operations such as links, buttons etc.
to within the <DIV> only ?

Let me clarify the problem a little.

I am doing an AJAX like operation inside a DIV. I do a server trip
without refreshing the page and get new HTML code that includes links
forms etc back from server. I need to confine operations within this
DIV without refreshing the whole page without using IFRAME.

Am i asking the right question or is there a known solution to such
problems
Your question is a little bit confusing...

Are you asking if it is possible to use your AJAX response-data
to update only the content of a specific div element, and not the
whole page?

If so, the answer is yes.

If your AJAX call ie. return some html-fragment, and you want a
specific div element to be updated to show this, do something like this

<div id="updateDiv">
...
</div>

...

function ajaxResponse() {
...

var updtDiv = document.getElementById("updateDiv");
updtDiv .innerHTML = xmlHttpObj.responseText;
...
}

Well Yes and NO !

I have already displayed the result of my server response in the DIV
(which i think is what you showed me). The question is, if the returned
HTML within this DIV has links and the user clicks on them, can i
display the result within this DIV itself and not a refresh on the
whole page ?


--
Dag.


Jun 22 '06 #3
Mel wrote:
Dag Sunde wrote:
Mel wrote:
Is there a way of restricting operations such as links, buttons etc.
to within the <DIV> only ?

Let me clarify the problem a little.

I am doing an AJAX like operation inside a DIV. I do a server trip
without refreshing the page and get new HTML code that includes links
forms etc back from server. I need to confine operations within this
DIV without refreshing the whole page without using IFRAME.

Am i asking the right question or is there a known solution to such
problems

Your question is a little bit confusing...

Are you asking if it is possible to use your AJAX response-data
to update only the content of a specific div element, and not the
whole page?

If so, the answer is yes.

If your AJAX call ie. return some html-fragment, and you want a
specific div element to be updated to show this, do something like this

<div id="updateDiv">
...
</div>

...

function ajaxResponse() {
...

var updtDiv = document.getElementById("updateDiv");
updtDiv .innerHTML = xmlHttpObj.responseText;
...
}

Well Yes and NO !

I have already displayed the result of my server response in the DIV
(which i think is what you showed me). The question is, if the returned
HTML within this DIV has links and the user clicks on them, can i
display the result within this DIV itself and not a refresh on the
whole page ?

--
Dag.


Yes, you can, but not automatically or simply. You would have to do
something that would modify the link action|event|behavior so that you
can capture it and control it to get the results and display back to the
div. Not a simple task if you ask me.
Jun 22 '06 #4

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

Similar topics

2
by: J.Beaulieu | last post by:
Hi I'll have probably to use sql server soon but prior to that I have a question concerning priviledges and security. Is it possible for someone to do like in access, ie creating a db/table...
6
by: Dave | last post by:
Hi, With this code, I thought that any 'click' with the mouse would be captured on the window level and nothing would happen, but a click on the button triggers nevertheless the function hit()....
38
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
9
by: Tim Mulholland | last post by:
Hello all, Our company is trying to write some code in C#/.NET that we don't want an end user to be able to see. The algorithms are not that complex, but are sensitive such that if a user could...
9
by: Howard | last post by:
I am currently looking at the various packages that are available for software protection. I have a particular question that I'd welcome your feedback on. Background info: I work for a company...
6
by: Rhino | last post by:
I am writing Java UDFs using DB2 V8.2 (Fixpack 8) on Windows XP. I would like to create some common code classes that are visible to the UDFs on my system but I'm not having a lot of luck so far....
51
by: Alan | last post by:
hi all, I want to define a constant length string, say 4 then in a function at some time, I want to set the string to a constant value, say a below is my code but it fails what is the correct...
26
by: Sandeep | last post by:
http://www.faqs.org/faqs/C-faq/abridged/ 3.1: Why doesn't the code "a = i++;" work? A: The variable i is both referenced and modified in the same expression. Here is the code that I have...
29
by: Amar Kumar Dubedy | last post by:
implement a c++ class such that it allows us to add data members at runtime.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.