[SOLVED] document write? |
|
06-28-2012, 10:22 AM
(This post was last modified: 06-29-2012 06:17 AM by 1912Dummy.)
|
|||
|
|||
|
document write?
Hello,
this is a little hard to fix in 1,2,3 :) please any help. Code: (SELECT ALL CODE) $id = $_GET["id"]; i add this into a html to get the result Code: (SELECT ALL CODE) Current count: <script type="text/javascript">it_display('1')</script>but i get as result: Current count: function it_display($id) { document.write(it_link[$id]); } instead of: Current count: 963 |
|||
|
06-28-2012, 02:17 PM
|
|||
|
|||
|
RE: document write?
seems i have fix it :)
but still don't work 100% i have now in the html as text: current count: undefined anyone? |
|||
|
06-28-2012, 03:49 PM
|
|||
|
|||
|
RE: document write?
There are a lot of different things that could be improved in this, however I'll try to stick to the to the original topic.
Have you tried this: Code: (SELECT ALL CODE) mysql_close(); |
|||
|
06-28-2012, 04:12 PM
(This post was last modified: 06-28-2012 04:15 PM by 1912Dummy.)
|
|||
|
|||
|
RE: document write?
hey kobe,
please i love when you can improve it i don't mind :) so let me know. :( no data displayed. |
|||
|
06-28-2012, 08:54 PM
|
|||
|
|||
|
RE: document write?
Please, get into the habit of telling others what language this is that you're having issues with, as it would definitely help. Before even trying to see what your issue with this code was, I had to review to analyze and determine whether this was Javascript or PHP or something else. To others unfamiliar with both, they may not even have a clue even if they wish to help you by doing some personal research.
Could it be because you're not echoing the values here, you're echoing the actual function: Code: (SELECT ALL CODE) echo 'Instead of using the function and calling it to return a value inside an echo? I'm not a perfect PHP programmer, but here that is definitely not the way you use a function lol ![]() Microsoft MVP .NET Programming - (2012 - Present) ®Crestron DMC-T Certified Automation Programmer Development Site: aceinfinity.net |
|||
|
06-29-2012, 04:19 AM
(This post was last modified: 06-29-2012 04:22 AM by 1912Dummy.)
|
|||
|
|||
|
RE: document write?
its just php.
and can't say because i have tried almost everything i even changed and changed it but nothing works. i even used: Code: (SELECT ALL CODE) echo function it_display($id) {even just Code: (SELECT ALL CODE) echo it_display($id)i only want to get it displayed in the html when i call this function: Code: (SELECT ALL CODE) Current count: <script type="text/javascript">it_display('1')</script> |
|||
|
06-29-2012, 07:52 PM
|
|||
|
|||
|
RE: document write?
You're trying to echo a document.write function though? Why? Just calling the function will call document.write, so why would you need to 'echo' it?
![]() Microsoft MVP .NET Programming - (2012 - Present) ®Crestron DMC-T Certified Automation Programmer Development Site: aceinfinity.net |
|||
|
06-30-2012, 04:29 AM
(This post was last modified: 06-30-2012 04:38 AM by 1912Dummy.)
|
|||
|
|||
|
RE: document write?
without the echo
i don't work then i got a error Code: (SELECT ALL CODE) document.write(ccount_link[id]);Parse error: syntax error, unexpected '[' |
|||
|
06-30-2012, 01:24 PM
(This post was last modified: 06-30-2012 01:24 PM by AceInfinity.)
|
|||
|
|||
|
RE: document write?
it's not an error for that line, but where's your '$' in there?
ccount_link is not another function is it? I think you should be reviewing PHP basics on your own first before requesting help here as it would benefit you even more to do so. ![]() Microsoft MVP .NET Programming - (2012 - Present) ®Crestron DMC-T Certified Automation Programmer Development Site: aceinfinity.net |
|||
Possibly Related Threads... |
| Thread: | Author | Replies: | Views: | Last Post | |
| Javascript Bookmarklet - Get Document Charset | AceInfinity | 0 | 522 |
03-25-2012 03:42 AM Last Post: AceInfinity |
|
| Users browsing this thread |
| 1 Guest(s) |

document write?



