Inserting javascript

I have some javascript for hiding email addresses. I have the
script named. It shows up in the assets list under files in
Dreamweaver CS3. When I select the javascript name, I can read the
entire scrip in the box above.
I should be able to simply drag the script into my document,
but all that copies into the document is this line.
<script type="text/javascript"
src="sheenaemail.js"></script>
The actual script never gets into the document. Nor can I
copy and paste the script from the window above where I can read
the script. No, I have to open another document that already has
the script, and copy and paste it from there into the new html
file. This is nuts! Here's the actual script.
<SCRIPT LANGUAGE="javascript" STYLE="font-size: 8pt">
<!--
var showlink = "shipping department";
var showname = "shipping";
var showhost = "peterwhitecycles.com";
document.write("<a href=" + "mail" + "to:" + showname +
document.write(showhost +">" + showlink + "</a>")
//-->
</SCRIPT>
What am I doing wrong?
Thanks,
PJW

bastiat wrote:
> I have some javascript for hiding email addresses. I
have the script named. It
> shows up in the assets list under files in Dreamweaver
CS3. When I select the
> javascript name, I can read the entire scrip in the box
above.
>
> I should be able to simply drag the script into my
document, but all that
> copies into the document is this line.
>
> <script type="text/javascript"
src="sheenaemail.js"></script>
>
> The actual script never gets into the document. Nor can
I copy and paste the
> script from the window above where I can read the
script. No, I have to open
> another document that already has the script, and copy
and paste it from there
> into the new html file. This is nuts! Here's the actual
script.
>
> <SCRIPT LANGUAGE="javascript" STYLE="font-size:
8pt">
> <!--
> var showlink = "shipping department";
> var showname = "shipping";
> var showhost = "peterwhitecycles.com";
> document.write("<a href=" + "mail" + "to:" + showname
+ "@")
> document.write(showhost +">" + showlink +
"</a>")
> //-->
> </SCRIPT>
>
> What am I doing wrong?
>
> Thanks,
>
Remove the <SCRIPT> tags and comments, and paste the
following in an
empty document:
showlink = "shipping department";
showname = "shipping";
showhost = "peterwhitecycles.com";
document.write("<a href=" + "mail" + "to:" + showname +
document.write(showhost +">" + showlink + "</a>")
save as: sheenaemail.js
Mick

Similar Messages

  • Inserting javascript - quote marks turn to an apostrophe

    I am having a strange problem with inserting javascript. The
    ending quote mark looks to be an apostrophe.
    type="text/javascript'> - and it seems to be screwing with
    the webpage reading the script. When I highlight it the quote mark
    is there. I have a few absolute paths to some of the javascript but
    it looks like this: <script src="
    http://www.xxxxxxx/scripts/default.js"
    type="text/javascript " ></script> - having to separate
    the quote marks that far to get it to read it - anyone know why
    this is?
    Thanks
    Rob

    There were oodles of things fixed in that upgrade to 6.1. You
    are at risk
    driving an unpatched 6.0.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Mick White" <[email protected]> wrote in
    message
    news:fpfk4v$fhg$[email protected]..
    > BOC_RUSH wrote:
    >
    >
    >> thanks Mick
    >>
    >> for peace of mind when I install DW via Adobe CS3
    Suite.. will that go
    >> away?
    >
    > For sure. And if I remember correctly DW issued a patch
    or an minor
    > upgrade. 6 to 6.1
    > Mick

  • How to insert javascript with in a servlet

    Please send the code to insert javascript with in a servlet

    hi,
    You have write u r java script code in Servlet with teh following steps
    1.Use out.println("<html> .....</html>")
    in between the above html code u write ur <script language="javascript"> etc
    write your javascript code in the above <sript tah function.
    Hope this helps
    -Srini

  • How to insert Javascript within Javascript ?

    I have a simple problem.
    I want to insert Javascript within Javascript ???
    Seems weird !!!
    Here's the scenario :
    I have created a JSP in which I have a function that Submits the main form in the main window.
    Here's the function :
    function SubmitContent()
    document.f1.method='post';
    document.f1.action='http://localhost:8080/examples/sherbir/texteditor2/page2.jsp';
    document.f1.submit();
    and here's the form description :
    <form name='f1'>
    But before that, on clicking the submit button in the main window, I am opening a child window to perform a few operations as follows :
    <input type="button" name="bttn_preview" value="Preview" onClick="javascript:SeePreview()">
    Here's the SeePreview() function which opens the child window:
    function SeePreview()
    var mywin=window.open("","","menubar=no,toolbar=no,scrollbars=yes,width=800,height=450");
    mywin.moveTo(0,50);
    mywin.document.write('<input type=button value="Make more changes"
    onClick=javascript:window.close()>');
    mywin.document.write('<input type="submit" name="child_bttn_sub" value="Proceed" onClick=self.close(); self.opener.SubmitContent();>');
    The child window in turn has a submit button as defined above.
    On clicking this button, I want the child window to close and hence submit the parent form also.
    It's not happening !!
    I even tried changing the order of the two statements in the OnClick event of the submit button in the child window.
    I also tried self.opener.document.forms[0].submit()
    None works.
    Where's the problem ??
    How do I remedy the situation ?
    Please Help.

    Not satisfiedAnd you won't be till you ask the right people for an answer. This is Java, and JavaServer Pages (JSP), not Javascript. If you go to a Javascript forum you will have a better chance of finding people who know more Javascript. Makes sense, doesn't it?

  • Why does RoboHelp 8.0.2 randomly insert javascript into all WebHelp topics?

    RH can randomly insert javascript into your project (can be in the <head> tag or <body> tag in all topics in the project) which evidences itself with red boxes in the editing pane, and duplicate breadcrumb links in the WebHelp output. Even if you clear the Add Breadcrumbs Links checkbox while setting your project's properties, you will still have some breadcrumbs in various topics (RH randomly assigns breadcrumbs to topics with no logic that I can see). After deleting all instances of the red boxes, RH inserted javascript again in the next compile.
    When you click the HTML tab you will see something similar to the following (the javascript has been highlighted):
    I was able to recover to a previous version (without RH's random destruction) b/c I used SVN, but I now have zero confidence in RH's stability. I definitely did not insert the above javascript into my project. I kept the default setting for the compiled help to go to the subfolder of the help system (i.e., !SSL!, WebHelp). Does anyone know why this happened?

    I'm not sure if this is the same issue, but it sounds close enough that I'd like to post it here...
    Issue
    I was either getting topic breadcrumbs in all of my topics (when they shouldn't have been), or getting "double" breadcrumbs (one stacked on top of the other) when I only should have had one breadcrumb. However, I didn't want any!
    Background
    By the time I had inherited this RH project (WebHelp), it had been worked on by at least three people over five years, using older (pre-9.0) versions of RH. I had just loaded RH ver. 9 when I took it over.
    Solution
    I noticed that there was a "breadcrumb" placeholder in the master page (xxxxx.htt) of the project. In the Single Source tab, when I right-clicked on WebHelp (Primary Output), and did not check the "Add breadcrumbs links" under the Navigation pane, I only saw one breadcrumb link in my generated output. When I checked the "Add breadcrumbs links", I saw two breadcrumb links in my generated output. When I deleted the "breadcrumb" placeholder in the master page (xxxxx.htt) of the project and did not check the "Add breadcrumbs links" under the Navigation pane in the WebHelp (Primary Output), then I finally saw no breadcrumbs in my generated output. Likewise, when the "Add breadcrumbs links" was checked, one breadcrumb was generated in the topic.
    Lessons Learned
    I suspect that either an earlier version of RH did not have this "Add breadcrumbs links" under the Navigation pane when you generated output (which mean that an earlier RH author had to use the breadcrumbs via the "placeholder" feature on the master page), or someone just didn't know how to implement the "breadcrumbs" feature correctly. In either case, I'm a little wiser from all of this!

  • Inserting javascript into template

    What I would like to do is have the same slideshow play on the right sidebar on all the pages of the website.  This is Javascript.  The engine and data folders are already on the server.
    www.wranglergirl.net
    The directions say to upon publishing the slideshow, to take the html generated code and enter it in the Head and Body tags (where I want it displayed, which is the sidebar) respectively.  Now, I opened the .dwt file and removed the existing content from the sidebar, but after saving, the html pages still had the content there - I since removed it from each page, but don't want to keep doing that.
    However, The Missing Manual says to.. Insert, HTML, Script Objects, Script.  Is doing that at the insertion point on the template correct?  Do I still have to enter the HTML code from the slideshow software?  Confused!
    This is a free template I got from Adobe.
    Amy

    It does.  Editable regions are created for child pages.  If you create an editable region and insert content into it, when you create a new child page, the content will be there.  If you edit the content in the template that is in the editable region, the changes will not be made to the existing child pages.
    So if you have a template, with an editable region, and you insert content into that editable region, any child pages that were previously made will not have this new contest inserted into them.
    Gary

  • How do i insert javascript stuff into dreamweaver?

    okay, first of all, im a total idiot when it comes to
    javascript and CSS, so please expect me to ask a lot of stupid
    questions.
    basically, i want to know how to insert a javascript file
    into your dreamweaver website. for example, i have a drop down menu
    i made using a program called Sothink DHTML Menu 9, and im not sure
    how to put that into dreamweaver. Can anyone help?

    Doesn't validate.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "GPaul" <[email protected]> wrote in message
    news:gnhu94$ird$[email protected]..
    > I'm not familiar with the <burp> tag?
    >
    > "Al Sparber - PVII" <[email protected]>
    wrote in message
    > news:gnhu4j$ikv$[email protected]..
    >> "name294" <[email protected]> wrote
    in message
    >> news:gnhtst$ic6$[email protected]..
    >>> okay, i just want to know if this program lets
    you customize your
    >>> drop-down
    >>> menus. from what i saw from the movie, they
    don't seem to give you the
    >>> greatest
    >>> freedom in customization.
    >>
    >> The freedom is actually total. Yes, you choose a
    style theme, but once
    >> you do the system writes a style sheet which is
    fully editable - just
    >> like a <burp> Spry style sheet </burp>
    >>
    >>> it seems like that you get a selection of
    pre-made menus and you have to
    >>> select which one you wanna use. I want to have a
    program that lets you
    >>> design
    >>> your own menu looks from imported images.
    >>>
    >>> does projectseven do that?
    >>
    >> Yes.
    >>
    >> You might want to have a look at PMM2 (which has
    replaced the one you
    >> looked at):
    >>
    http://www.projectseven.com/products/menusystems/pmm2/carbon.htm
    >>
    >> And also the tweaks section here:
    >>
    http://www.projectseven.com/products/menusystems/pmm2/tweaks/index.htm
    >>
    >>
    >> --
    >> Al Sparber - PVII
    >>
    http://www.projectseven.com
    >> The Finest Dreamweaver Menus | Galleries | Widgets
    >>
    http://www.projectseven.com/go/pop
    >> The Ultimate DW Menu System
    >>
    >>
    >>
    >>
    >>
    >>
    >
    >

  • Insert javascript into folio problem

    Hi,
    I've tried to add some HTML code to rectangle object in Indesign (Object/Insert HTML):
    <script type="text/javascript">
        window.location = 'http://www.google.com/';
        alert("This is  Page");
    </script>
    then trying to see the result in Content Viewer -- but neither redirection nor alert message occurs.
    Could anyone tell me should I write full HTML code (<html> <head>...) to see the result?
    Where I'm wrong?
    Thanks

    Do you have several accounts?
    See this thread, it's the same question:
    http://forum.java.sun.com/thread.jspa?threadID=5143232
    Kaj

  • Insert JavaScript Error

    Hi Guys,
    I have just completed a page and when I try to finish the
    insert behaviour I get the following error message
    'While executing apply ServerBehaviour in insert Record.htm,
    a JavaScript error occured'
    Does anyone know if this is a know bug, or a problem with my
    install?
    I am using DW8 (trial with 8.02 update) Windows Vista Home
    Premium.
    Many thanks Les
    ps sorry if this is posted twice, did not appear earlier and
    just wanted to be sure

    LJG wrote:
    > I have just completed a page and when I try to finish
    the insert behaviour I
    > get the following error message
    >
    > 'While executing apply ServerBehaviour in insert
    Record.htm, a JavaScript
    > error occured'
    It's almost certainly a corrupted data cache. The remedy is
    simple:
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19105&sliceId=1#dat
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Truncated URL from Inserted Javascript

    In my help project, I have a Send Feedback link that grabs
    the topic's title and URL, but for some reason RoboHelp is
    truncating the URL.
    Here's the script. Insert it in your HTML code, preview the
    topic, and click the link. Do you see a truncated URL? After about
    105 characters, it ends.
    <script type="text/javascript">document.write("<a
    href=\"mailto:[email protected]?subject=Sample App | " +
    document.title + " | " + location.href + "\"> Send
    Feedback</a>") ;</script>
    I also tried inserting via the Insert > HTML > Advanced
    > Script method. Same result.

    Tom
    It's late so I'll decline the offer to test it!
    Take a look at my site, one of the early snippets has a
    script. Maybe that will help.

  • Insert JavaScript in Java - does it is possible?

    I have a very interesting problem ,I write a JSP and I need to invoke javascript function in my java code in my JSP does it is possible and how if it's?

    You can output javascript functions from java but one cannot call the other - javascript executes on the client and java executes on the server. They don't talk to each other. You might try using a javascript that executes on the load of the page and writing out some variable values from your java code. That's about as close as you can get.

  • How to insert Javascript into LinkToURL component

    Hi all!
    I want to start several applications inside the intranet page.
    To do that in HTML I can access applications by a Javascript code, instantiating Windows Script Shell ActiveX.
    How to do that in LinkToURL component? Is there any other ways to do that?

    Hi,
    Same issue discussed & resolved in below link..
    Re: Procedure: Display of HTML stream using LinkToURL/LinkToAction UI  Elements
    Raja T
    Message was edited by:
            Armin Reichert

  • Is there a way to embed JavaScript within JavaMails?

    I have a program that creates and sends e-mails. Is it possible to insert JavaScript inside the mail message so that when a user clicks on a link in the html e-mail a alert("Warning : blah balh "); may appear?
    I know it's possible to embed the JavaScript, but can't get it to work. Is that not possible with html e-mails?

    Yes. surely.
    What can be done is :
    1. define an ascii file with the necessary
    <script>
    <!-- javascript -->
    function funcName() {
    alert("Blahhha");
    </script>
    __YOUR-PAGE-CONTENTS-HERE__
    2.Read the above <script></script> block in a Str Buffer
    3.Also substitute the __YOUR-PAGE-CONTENTS-HERE__ with ur page contains along with onLoad = funcName();
    4.This will dynamically generate a page for u, which u need to send as a plain message or as an .html (attachment).
    I think u will easily do it.
    Best Lucks
    from:
    Dhiraj.

  • Javascript on page (used for OBI integration)

    I have been working from a document posted on MyOracleSupport entitled "Integrating OBIEE with PeopleSoft." The method described is placing a button and an html area on a page and inserting javascript to "push" the button and launch the code that creates a token and opens an OBIEE report.
    I have been stuck on the first piece (inserting the javascript), and "Support" has not been helpful so far.
    The instructions are to add this code to Component PreBuild PeopleCode.
    Local Field &HTMLField;
    &HTMLField = GetField(DERIVED_OBIEE.HTMLAREA);
    &HTMLField.Value = "<script type='text/javascript'> eval(""submitAction_""+document.forms[0].name+""(document.forms[0],'DERIVED_OBIEE_OPRID');"") </script>";
    The author notes that "this sets the initial content of the HTML Are to a script that effectively hits the Refresh Button that then fires the DERIVED_BIEE.OPRID.FieldChange event."
    Both the HTMLAREA and button (OPRID) are at level0 and at the top of the page order, and I have been told that there is nothing in the HTML object to begin with.
    When I open the page, however, all I get is an HTML area that contains the literal code from above. Nothing executes.
    What am I missing?

    Did you set the page field name on properties of the HTML area? In your case you should probably set this to DERIVED_OBIEE.HTMLAREA.

  • Including inline javascript code OR link to JS file

    We have some use cases, for which we want to allow authors/publishers to specify inline javascript OR link to a JS file on a CQ page. We enabled source editing mode for Rich Text Editor (using misctools plugin).
    Now I can enter HTML including <SCRIPT> tags in the rich text editor. But the problem is richtext validation checker strips out Javascript automatically. Is there any way to turn off this validation and stop stripping off of javascript?
    Is there any other way that we can directly enter javascript to CQ pages?

    If your concern is only related to how you can insert javascript on page through user interaction (i.e. component authoring) then probably you can use textarea (xtype) instead richtext, if it solves the purpose.

Maybe you are looking for