473,386 Members | 1,790 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,386 software developers and data experts.

load content of database with a click from DIV with id A to DIV with id B

how can i send values from a link on index.php eg <a href="messages.php?view=1" id="messages">Username</a> to messages.php and load the returned results in a DIV called <div id="viewMessages"></div> but weout going to the messages.php or refresh the index.php with AJAX?

the fellowing is the ajax code which am trying but i cant figure it out it is only doing the loading of link id A to Div id B


Expand|Select|Wrap|Line Numbers
  1. <script language="javascript" src="js/jquery-8.js"></script>
  2. <script language="javascript">
  3. $(function(){
  4. $(".messages").click(function(){
  5. $("#viewMessages").load("search_m.php");
  6. });
  7. });
  8. </script>
Jun 1 '13 #1
1 1344
Oralloy
988 Expert 512MB
capt.

Unless you have a good reason not to, will you please show us all the elements involved here? The reason that you aren't getting a good response is that we can't see what is really going on.

My suggestion is that you post both PHP scripts and we'll go from there. Don't forget to use CODE tags.

Here is a list of the BB Tags that are available, and their use.

Kind Regards,
Oralloy
Jun 2 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: John South | last post by:
Hi I've developed a simple web service that lets people easily set up their own websites, and keep them up-to-date themselves. I'm storing all the content, including images in the SQL 2000...
2
by: jayson_13 | last post by:
Hi, I have a menu screen and i want to store the menus in a table. Is the a way that i can load the form according to the menu user has selected? Eg: Menu =================
1
by: Irene | last post by:
Hello all! I'm creating a web site in ASP.NET (VB.NET). One of the requirements was to allow users to create orders going through several steps. A must have is to have an option to save the work...
1
by: jessegogo | last post by:
Hi there everybody. I must admit I am more of a designer than a programmer so I am looking to you for more help than I'm afraid I can return. If of course you have any questions about design...
2
by: jayasabari | last post by:
Hai, When button is clicked, then i have to prevent the execution of one function in page load. can you give any suggestion please. With Regards, K.Jayasabari
1
by: RhazeMondragon | last post by:
ellow guys!!! plz help me.... thanks a lot!!!!!
7
by: vandananambiar | last post by:
Hi Guys, I want to load contents from a text file to a db2 table.I have already created the table with the same column names as in the text file.Can anybody help me out? Thanks in advance,...
1
by: azzhey | last post by:
I have many DIV contents and want they click on Minus/Plus link to refresh content. Anyone can help me how to write code Refresh or reload DIV content by click on a href? thanks anyone try to solve...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.