How to write complicated codes inline?

  • Thread starter i6033162556-signup1
  • Start date
I

i6033162556-signup1

I need to convert some long codes inline. I want to know the generate
rules for doing that.

1 first remove <script></script>
2 use / in front of all "s
3 remove all newline characters.

Anything else? Is inline JS sharing varibles and function names in the
html?
I need that info so I can covert many scripts at once by writing some
shell or perl scripts.

Thanks.
 
R

Randy Webb

I need to convert some long codes inline. I want to know the generate
rules for doing that.

1 first remove <script></script>

And if its <script type="text/javascript"> or <script
language="javascript"> or <script language="JScript"> or <script
language="VBScript"> ??

The simple answer is a search and replace with a regular expression.
PERL can very readily handle that.
2 use / in front of all "s

I think you actually want the \ as thats the escape character. Again,
its a search/replace.
3 remove all newline characters.

search and replace.
Anything else? Is inline JS sharing varibles and function names in the
html?

No, it shares variables and functions within the scripts, not in the HTML.
I need that info so I can covert many scripts at once by writing some
shell or perl scripts.

And now you have it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,146
Latest member
Vinay KumarNevatia_
Top