473,386 Members | 1,867 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.

Passing JavaScript form field to PHP function

I am passing a form field in JavaScript to a PHP function. The problem is when the parameter gets inside the PHP function the value is set to 1 when it should be a relative path to a file.

setup_config.php:
Expand|Select|Wrap|Line Numbers
  1. <script language="javascript">
  2. function install(){
  3. ...
  4. Install.ExecuteDBScript(document.getElementById('path').value, document.getElementById('self-serve').checked, function (result)
  5. {
  6. alert("result = " + result);
  7. ... }
  8. }
  9.  
install.class.php:
Expand|Select|Wrap|Line Numbers
  1. function ExecuteDBScript($path, $selfserve, $check=0) {
  2. $tspace = "CREATE TABLESPACE ".$schema." DATAFILE
  3. '".addslashes($path)."\\$schema.DBF' SIZE 2M AUTOEXTEND ON NEXT 2M MAXSIZE UNLIMITED
  4. LOGGING
  5. PERMANENT
  6. EXTENT MANAGEMENT LOCAL AUTOALLOCATE
  7. BLOCKSIZE 8K
  8. SEGMENT SPACE MANAGEMENT MANUAL
  9. FLASHBACK ON";
  10. return $path;
  11. }
  12.  
The alert displays a 1. Any ideas why?
Oct 3 '07 #1
2 1697
Motoma
3,237 Expert 2GB
I am afraid you haven't give us enough code to effectively debug your application.
Oct 3 '07 #2
ronverdonk
4,258 Expert 4TB
Harmony504: You must enclose any code shown in this forum within the appropriate code tags.

Please read the Posting Guidelines before you post in this forum!

moderator
Oct 3 '07 #3

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

Similar topics

12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
5
by: Jim Banks | last post by:
Greetings I'm opening a pop up window with a html form, (in one document) and I want to pass a variable to the html form called from the hyperlink. Here's the code I'm using to pop up the...
8
by: ridgedale | last post by:
I wonder if anyone could explain how I pass the field values in my request form to the PHP processor page. My external javascript file is as follows: var sections = ; for (var i=0; i <...
7
by: EyeHawk | last post by:
I’m fairly new on ASP and Javascript programming, I have read as much as I can to develop my website in a user friendly manner. I’m using javascript to pass some values in a Form, but is no working,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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:
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:
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
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...

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.