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

php added with javascript

77
hello all, hope i''m correct of posting to this forum

i have this html with php
Expand|Select|Wrap|Line Numbers
  1. <input name="textfield" type="text" size="10" value="<?php echo $this->ProjectPraBp_model->getProjectPraBpDate("xxxxxx");?>">

you see the "xxxxxx"with bold, i want the xxxxx is javascript variable. Can i ??

help please, tks

maminx
Jul 29 '08 #1
2 1049
pbmods
5,821 Expert 4TB
Heya, Mamin-X.

JavaScript can't interact with PHP directly (PHP is run on the server, whereas JavaScript is run on the client side).

You'd either need to submit a form or else use Ajax to send the value of the Javascript variable to the PHP side.
Jul 29 '08 #2
geess
3
hi frnd,

my suggestion is pass the php value as <input type="hidden" value="<?echo $var;?>" id="var1" name="var1"/>
& thn get the value using javascript as

getElementById('var1').value;


probably work.....but at some extand it wont work also.................
Jul 30 '08 #3

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

Similar topics

8
by: Ashish Shridharan | last post by:
Hi All I have been trying to add a control to the header cell of a datagrid on my ASP.NET page. These controls are defined in the HTML as ASP.NET web controls. They are being added into the...
1
by: antishok | last post by:
Hi, I'm writing a page which has a somewhat similar folder tree to that of the windows explorer, where each folder is made of a <SPAN> tag consisting of the folder image (closed or open) and the...
2
by: Herve MAILLARD | last post by:
Hi, J'ai un bouton ASPX qui doit déclencher un script java. I have an ASPX button running a javascript. To do this, I have added in the codebehind :...
1
by: Bruce | last post by:
I use btnSave.Attributes.Add("onclick", "ShowMessage()") to link my web control button to a JavaScript function. It works well until I added a Validation control into the page. After that,...
17
by: Leif | last post by:
Hello All, Last week (11 Nov 05) with the Subject header: "XHTML 1.0 Strict validation problem", I tried to describe a validation problem with text added to my source files in XHTML. I was...
5
by: Dennis Fazekas | last post by:
Greetings, I am creating a web form which will all the user to add an unlimited number of email addresses. Basically I have 3 buttons, "Add Another Email", "-" to remove, and a "Save" button....
0
by: melledge | last post by:
Ajax Developers' Day added to XTech 2006 agenda XTech 2006 - 17-19 May - Hotel Grand Krasnopolsky - Amsterdam, The Netherlands
1
by: pstrand2000 | last post by:
My page uses a horizontal navigation bar that requires a JavaScript file to force IE to do hovers. It worked great in both Fire Fox and IE until some Flash code was added. This is how the Flash...
2
by: Tereska | last post by:
I want to delete script added before. I'm adding script dynamically and i'm removing later. Why it is still working? I have something like this: <html> <head> <title>JS Script...
3
by: ajitkumar071 | last post by:
hi all .....please help me ... my problem is i m having a row by default.And validation works fine for this, But if i add an extra row to it.....even if i enter the values for the new added row i...
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: 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
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
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
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
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...
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,...

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.