Raised This Month: $ Target: $400
 0% 

Javascript Troubles


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 02-19-2009 , 20:23   Javascript Troubles
Reply With Quote #1

I am having some issues with my 'string' function in JavaScript. For some apparent reason, it is not displaying my output(text), any ideas why? It is most likely something really simple that I over-looked and didn't catch when proof-reading.

PHP Code:
<html>
<
body>

<
script type="text/javascript">

var 
string_replace="Visit testingcode.com";
document.write(string_replace.replace.(/testingcode.com/,"Google.com"));
// more code after this, but it is too long to post here.

</script>
</body>
</html> 
BOYSplayCS is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-19-2009 , 20:27   Re: Javascript Troubles
Reply With Quote #2

How is related to Amxx ? :p
Arkshine is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 02-19-2009 , 20:28   Re: Javascript Troubles
Reply With Quote #3

This forum was never specified for AMXX scripting only. I haven't read anywhere that it stated: AMXX Scripting Help ONLY.
BOYSplayCS is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-19-2009 , 20:34   Re: Javascript Troubles
Reply With Quote #4

Here it's the official AMXX board not Javascript. Why would you talk about Javascript here. oO
It's not stated because it's more than logic that scripting is for AMXX. ( AMX Mod X > Scripting > Scripting Help )

Offtopic would be the right place for that. ^^

Last edited by Arkshine; 02-19-2009 at 20:38.
Arkshine is offline
commonbullet
Veteran Member
Join Date: Oct 2005
Old 02-19-2009 , 21:06   Re: Javascript Troubles
Reply With Quote #5

offtopic.

btw,
Code:
document.write(string_replace.replace.(/testingcode.com/,"Google.com"));
should be

Code:
document.write(string_replace.replace(/testingcode.com/,"Google.com"));
commonbullet is offline
Send a message via ICQ to commonbullet Send a message via MSN to commonbullet
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 02-19-2009 , 22:51   Re: Javascript Troubles
Reply With Quote #6

In my personal opinion, Scripting Help should be all help.

Anyway, thank you commonbullet, that had to be the most over-looked code I've ever had.
BOYSplayCS is offline
TeddyDesTodes
Senior Member
Join Date: Oct 2008
Location: 10.25.15.210
Old 02-20-2009 , 10:16   Re: Javascript Troubles
Reply With Quote #7

/testingcode.com/ how should compiler know that this is a string to search for?
__________________
TeddyDesTodes is offline
Send a message via ICQ to TeddyDesTodes
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 02-20-2009 , 17:36   Re: Javascript Troubles
Reply With Quote #8

Quote:
Originally Posted by TeddyDesTodes View Post
/testingcode.com/ how should compiler know that this is a string to search for?
As stated in my previous post, that wasn't the full code, just the portion I was having errors on.
BOYSplayCS is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode