• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Display text using javascript

 
Ranch Hand
Posts: 93
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
I want to display results from php by using javascript
but i am getting an error

<br />
<b>Notice</b>:  Undefined index: para1 in <b>C:\xampp\htdocs\webpage\cardetails.php</b> on line <b>8</b><br />
successfull


here is my code for javascript:



and here is my connection to php

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem with your code is that you are not posting anything with name "para1" in your requests. The notice PHP generated is pretty clear.

line 75 -> w= para1; should be w="para1="+para1; like you did above...
 
Vani Sweety
Ranch Hand
Posts: 93
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have pass the parameter but it is giving me an error in php

<br /> <b>Notice</b>: Undefined index: para1 in <b>C:\xampp\htdocs\webpage\cardetails.php</b> on line <b>8</b><br /> successfull

Actually the value of para1 i am getting if from a javascript function
when clicking on a specific item for example clicking on ch in a list it display all the values comtaining this item form database.
Like
chocolate
choke
now when i click on chocloate it should display all the information about chocolate for example the colour.
here is the code for javascript:


and here is the code for php:
 
Vani Sweety
Ranch Hand
Posts: 93
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Intead of retrieving the values and displaying them it is displaying successfull
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic