URL from Character Style

I am trying to figure out how to create a script of some kind (apple or java) that will search a document for any instance of a character style and turn that into a URL. If this has been posted before does anyone know where? I searched but can't find anything.
Any help or guidance would be appreciated. I am using CS3 on MAC.
Thanks

Hi,<br />//Assuming your character styles is called "web"<br />//In other cases, replace web by your own predefinite name<br /><br />var doc=app.activeDocument;<br />//Define find text preferences as text using character style called "web"<br /><br />app.findTextPreferences.appliedCharacterStyle=doc.characterStyles.item("web");<br /><br />//Find text occurences that match the preference<br /><br />var found = app.findText();<br /><br />//Add hyperlinks to the occurences<br /><br />for(i=0; i<found.length; i++)<br />{<br /><br />//Replace Yahoo.fr by your desired website<br />     <br />var dest=doc.hyperlinkURLDestinations.add("http://www.yahoo.fr");<br />     <br />var source = doc.hyperlinkTextSources.add(found[i]);<br />     <br />var dest=doc.hyperlinkURLDestinations.add("http://www.yahoo.fr");<br />     <br />doc.hyperlinks.add(source,dest, {visible:false, name:"yahoo.fr ("+(i+1)+")"});<br /><br />}<br />//If you want to export your doc as a interactive document, don't forget to set add hyperlinks to true or they won't be active in your pdf.<br />Loic

Similar Messages

  • CS5: Hyperlink to text anchor from character style?

    Is it possible to script the following:
    A text has several occurances of the same string, e.g. 'A10'. One is marked with a character style 'Anchor' and the others are marked with a character style 'Link'. The idea is to create text anchors from the 'Anchor' style and then find every occurrence of the character style 'Link' and create a hyperlink to the matching anchor.
    I've managed to find a script that creates text anchors from a character style 'Anchor'. Can someone offer some suggestions on how to do script creating the links?
    // Written by Kasyan Servetsky
    // March 13, 2011
    // http://www.kasyan.ho.com.ua
    // e-mail: [email protected]
    //======================================================================================== =================================
    if (app.documents.length == 0) ErrorExit("Please open a document and try again.");
    const gScriptName = "Create Text Anchors";
    const gScriptVersion = "1.0";
    var gDoc = app.activeDocument;
    if (!gDoc.characterStyles.item("Anchor").isValid) ErrorExit("Character style \"Anchor\" doesn't exist.");
    CreateDestinations();
    //======================================================== FUNCTIONS  =====================================================
    function CreateDestinations() {
        app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;
        app.findGrepPreferences.findWhat = ".+";
        app.findGrepPreferences.appliedCharacterStyle = gDoc.characterStyles.item("Anchor");
        var finds = gDoc.findGrep();
        var destCounter = 0;
        for ( var j = finds.length-1; j >= 0; j-- ) {
            var found = finds[j];
            try {
                if (!gDoc.hyperlinkTextDestinations.itemByName(found.contents).isValid) {
                    var hypTextDest = gDoc.hyperlinkTextDestinations.add(found);
                    hypTextDest.name = found.contents;
                    destCounter++;
            catch(e) {}
        if (destCounter == 0) {
            alert("No text anchors have been created.", gScriptName + " - " + gScriptVersion);
        else if (destCounter == 1) {
            alert("One text anchor has been created.", gScriptName + " - " + gScriptVersion);
        else if (destCounter > 1) {
            alert(destCounter  + " text anchors have been created.", gScriptName + " - " + gScriptVersion);
    function ErrorExit(error, icon) {
        alert(error, gScriptName + " - " + gScriptVersion, icon);
        exit();

    Hi,
    The way is:
    create hyperlinkTextDestination;
    create hyperlinkTextSources;
    create hyperlinks using one destination and various sources;
    so:
    // to create hyperlinks alike:    one destination==>many sources
    // destination is the 1st occurrence of text with charStyle "anchor" applied
    // sources are each occurrences of text with charStyle "link" applied
    var mDoc = app.activeDocument;
    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
    app.findTextPreferences.appliedCharacterStyle = mDoc.characterStyles.item("anchor");
    var
         mAnchor = mDoc.findText()[0],
         mDest;
    if (mAnchor) mDest = mDoc.hyperlinkTextDestinations.add(mAnchor,{name: mAnchor.words[0].contents});
    else {alert ("no anchor found"); exit(); }
    app.findTextPreferences.appliedCharacterStyle = mDoc.characterStyles.item("link");
    var
         mSource = mDoc.findText(),
         len = mSource.length,
         currSource, currHyper;
    if (!len) {alert ("no link found"); exit(); }
    while (len-->0) {
         currSource = mDoc.hyperlinkTextSources.add(mSource[len],{name: "sourceLink_" + len});
         currHyper = mDoc.hyperlinks.add(currSource, mDest, {name: "mHyperlink_" + mDest.name + "_" + len});
    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
    Jarek

  • Script needed to generate a list of paragraph and character styles from the Book Level

    Hello,
    I am using FrameMaker 11 in the Adobe Technical Communication Suite 4 and I need to find a script that will generate a list
    of paragraph and character styles from the book level.
    I am working with unstructured FrameMaker books, but will soon be looking at getting a conversion table developed
    that will allow me to migrate all my data over to Dita (1.1 for now).
    Any thoughts, ideas on this is very much appreciated.
    Regards,
    Jim

    Hi Jim,
    I think the problem you are having with getting a response is that you are asking someone to write a script for you. Normally, you would have to pay someone for this, as it is something that folks do for a living.
    Nonetheless, I had a few minutes to spare, so I worked up the following script that I believe does the job. It is very slow, clunky, and totally non-elegant, but I think it works. It leverages the book error log mechanism which is built in and accessible by scripts, but is spendidly unattractive. I hope this gives you a starting point. It could be made much more beautiful, of course, but such would take lots more time.
    Russ
    ListAllFormatsInBook()
    function ListAllFormatsInBook()
        var doc, path, fmt;
        var book = app.ActiveBook;
        if(!book.ObjectValid()) book = app.FirstOpenBook;
        if(!book.ObjectValid())
            alert("No book window is active. Cannot continue.");
            return;
        CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
        CallErrorLog(book, 0, 0, "** Book format report for:");
        CallErrorLog(book, 0, 0, book.Name);
        var comp = book.FirstComponentInBook;
        while(comp.ObjectValid())
            path = comp.Name;
            doc = SimpleOpen (path, false);
            if(doc.ObjectValid())
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, doc, 0, "");
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, 0, 0, "Paragraph formats:");
                fmt = doc.FirstPgfFmtInDoc;
                while(fmt.ObjectValid())
                    CallErrorLog(book, 0, 0, "  - " + fmt.Name);
                    fmt = fmt.NextPgfFmtInDoc;
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, 0, 0, "Character formats:");
                fmt = doc.FirstCharFmtInDoc;
                while(fmt.ObjectValid())
                    CallErrorLog(book, 0, 0, "  - " + fmt.Name);
                    fmt = fmt.NextCharFmtInDoc;
            else
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, 0, 0, "!!!  Could not open: " + comp.Name + " !!!");
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
            comp = comp.NextComponentInBook;
    function CallErrorLog(book, doc, object, text)
        var arg;
        arg = "log ";
        if(book == null || book == 0 || !book.ObjectValid())
            arg += "-b=0 ";
        else arg += "-b=" + book.id + " ";
        if(doc == null || doc == 0 || !doc.ObjectValid())
            arg += "-d=0 ";
        else arg += "-d=" + doc.id + " ";
        if(object == null || object == 0 || !object.ObjectValid())
            arg += "-O=0 ";
        else arg += "-O=" + object.id + " ";
        arg += "--" + text;
        CallClient("BookErrorLog", arg);

  • Table of contents from lists or character styles

    I have a legal document and I want to create a table of contents that includes, not just Headings (Article I, II, III, etc.) but also the sub headings (eg: Artilcle IV.3) which were created as numbered lists.  If I give the list item a paragraph style it will put the whole text into the TOC.  If I put a carrige return after a List heading it makes the body text as a new number in the list.  Is there some wat to get either lists or character styles into the TOC? Can you have an in-line paragraph style? Here's what the document looks like:
    Article VII Heading
    List Heading.  body text...
    a)   Sublist heading body text
    b)   Sublist heading body text
    List Heading.  body text...
    Is there any way to do this so that the TOC reads something like this:
    Article I   Heading              ....... page 2
              2. List Heading          ....... page 2
                a) Sublist Heading   ....... page 2
                b) Sublist Heading   ....... page 2
              3. List Heading          ....... page 3
    Article II                              ....... page 3
    etc. ??
    I could do this manually, but this is document is being edited now and again and I don't want to have to change the TOC everytime we make a small chage to the document.
    Thanks,
    Brendan

    The numbering and lettering are automatically generated by the List I selected.
    It's been a few months since I did this, so I'm trying to remember exactly how the process went.
    I've edited Bylaws and Constitutions like this several times for several non-profit organizations over the years, first on MS-DOS with floppy-discs using WordPerfect, later Windows and MS-Word, and now Mac OS-X and Pages '09. With each new iteration of software it keeps getting less painful, but it's still not a piece of cake.
    This time, I began with scanned images of the last printed original copy (2008) for a document that no longer existed in any original computer format (1994). I imported the scans into Optical Character Recognition software included with my Canon printer/scanner.
    I was determined NOT to re-type the whole document from scratch, so the editing I describe WAS time-consuming and a bit tedious, but still a bit less painful that starting from scratch. I'm a volunteer and retired. A paid fast(er) touch-typist working in an office (and their supervisor) might strongly disagree!
    After cleaning up a few OCR-generated typos, I was also determined not to manually re-create the outline format and the table of contents if at all possible. Even 1980's WordPerfect on floppy discs could automatically generate an outline and a table of contents from marked text!
    I used Lists to generate the desired outline format similar to the original, in some cases, correcting errors, but as shown in the above example, there are a few A's without B's and so on, because the original document (1994) was formatted that way, and I didn't want to substantially re-write the Bylaws at this time. (Save that for another day!)
    As I edited, with the printed original by my computer, I did delete the original outline I's, A's, 1's a's, and so on as I went through, letting List do the re-numbering, and using Style to format the newly numbered headings.
    Simple shortcuts when auto-generating lists: a [Tab] moves the active heading to the next-lower designation, and [Shift]+[Tab] moves it to the next-higher designation. Occasionally, I have to just use [Delete] to back up over the suggested letter, and start over again with [Return] to force the next letter/number.
    And opening Inspector, Text, Lists, as shown in the example above, might help you more easily 'control' the outcome, as does Inspector, Document, TOC, noted earlier.
    Hope this helps!

  • Unwanted character styles in my placed (from Word 2010) paragraphs

    Hello...
    Lately, when I place a Word 2010 file with a specific paragraph style into InDesign CS 5.5,, the characters are bold -- which is NOT part of the style as defined in both Word and InDesign.
    If I then right-click on the style in the paragraph style panel and select "apply...and clear character styles" the bold, of course, disappears.
    The problem (besides the incovenience), of course, is that this action also removes any character attributes (such as bold) that I purposely applied to some of the text.
    As far as I can tell, these affected paragraph styles are defined in both Word and in the InDesign template correctly, so I can't figure out why this is happening...and it is a new phenomenon. This is a monthly newsletter, and it did not happen last month.
    Thanks.
    SS

    I was having the same problem and am no longer having it. I'm not sure exactly what solved it, but here are two things I did:
    Changed the number of column on my master page and re-applied it to the current page (can't fathom how this would change things, but who knows?)
    Change my import settings to these:

  • Print Without Hyperlink Character Styles

    Hi,
    I have applied a character style to URLs in my document that look like links so that when I export to pdf, people can click the obvious URL link.  However, the document will also be printed and I do not want the text to have this character style applied to it (or be a hyperlink).  I thought when I exported to PDF and unchecked 'Include Hyperlinks', no hyperlink formatting would be present in the pdf, including character styles applied to hyperlinks, but I cannot seem to print without the character style being applied. 
    Is there a way to choose in the print dialog whether I want the character style applied to the text?  Or what is the easiest way to toggle between showing hyperlinks and not showing hyperlinks (including character styles) as I need to switch between print versions and electronic versions of my document?
    Thanks so much!

    Or maybe easier would be to define a second style with attributes, then use find/change to change from one to the other. Easy to go back and forth that way.

  • Jump Character Style in FM Showing up Wonky In RH

    Using TCS 2.0 (RH8 and FM 9).  Linked project, the Jump character style in FM (sets a hyperlink), when generated in RH is including extended text.  So for example [mylink is showing up like this] instead of like [this] (brackets used instead of underline since I can't get that to work).  It seems to be random how much extended text RH decides to link.  I'm inclined to think this is a bug and wondering if anyone has experienced this problem and if there is a workaround other than post processing in RH to fix it.
    What I have done is just remove the jump from my FM docs and have the URL spelled out.  Though it would be nice to get the jump style to show up correctly.  There does not appear to be an alternate style I can map it to in RH to hyperlink.
    Thanks,

    Further to my original post, further info as follows:
    Platform: Windows XP, SP2 both PCs that this happens on are fully functional for Graphics we run CS3 Master Suite, Corel, Quark, etc.
    Weve applied the patches, through the Adobe Updater (the download link doesnt work) version is 8.0p273
    We used the File - Save As PDF option saving as either a High Quality or X1a PDF (but weve tried all types, to rectify the problem it persists with all options).
    Thanks again for any help!

  • Working with Character Styles in Photoshop CC

    Hi,
    I upgraded to Photoshop CC and was quite excited about the Character Styles Panel. But now, I'm completely puzzled.
    It almost looks like Adobe didn't finish the feature before shipping 14.1.2
    1. I can't reorder the character list? Why use a different list implementation than that for "Layer Comps?"
    2. I want to copy and paste a character style from one selection to another (Basically the workflow from Apple Keynote). It should be possible with character styles, but it just didn't work:
      - I select a formatted text section
       - I press "New Character Style icon"
       - I double-click the new style -> The font-size in the style differs from the font-size of the orginal selection?!
       - I'm pretty sure it has to do with style of the original text not being directly overwritten from "None", but there is no feature to "bake" style-formatting either.
    3. I can't remove and restyle the Character-Style "None". But when I accidently assign "None", it is defined as 12px Arial Black . So the default-style HAS a style definition and should therefore be editable like the other character styles.
    I'm completely blow away how non-intuitive the whole process is. I never had problems to understand character styles in InDesign, Pages, Word and Illustrator. But in Photoshop is either completely broken or non-intuitive.
    Just my two cents.
    tom

    Your sure your using photoshop cc on windows vista?
    I was under the impression that photoshop cc would not even install on windows vista.
    What version of camera raw do you have?
    In photoshop under Help>About Plugin does it list Camera Raw and if so which version is it?
    (click on the words Camera Raw to see the version)
    Camera raw doesn't work if it's a camera raw file or some other file type such as jpeg or tif?
    What camera are the camera raw files from?
    Officially camera raw 8.3 is the latest version of camera raw that will work on windows vista.

  • Paragraph styles all default to wrong character style

    So I set up a template and based all my character styles on my basic body copy. However, every new text box I create it defaults to the "character styles" to my section header color and sizing. I have to right click and "clear character styles" every single time. I've never had this happen before and cannot figure out how to fix it, it is such a PAIN!

    From your explanation, I suspect your use of Character Styles might need to be redirected to Paragraph Styles. But that is conjecture, so I apologize if I'm wrong. In any case, to solve your problem; with nothing selected, choose No Character Style in the Character Styles panel. That sets the default for new frames.

  • Cross references not picking up character styles in source text

    I'm getting some annoying odd behaviour with cross references in Frame 12.
    I have some tables, where the paragraph style in the cell is called "Cell Body" (nothing odd there).
    Quite a few of the cells only have one word in them, and that word is set to courier font with a character style (called "Code").
    Then, elsewhere in the document, I am referring to this text using cross references. I am referencing the paragraph style Cell Body, and the cross reference format applied is like this "<hyperlink><$paratext><Default ¶ Font>"
    "hyperlink" is another character style that makes the text go green.
    So, the cross reference out to take the text from the cell (in Courier) and reproduce it, coloured green.
    However for about half of these cross references, it isn't picking up the Code character style in the source text, so the cross ref is just green, no green courier.
    Things are further bamboozled when I output to HTML Help.
    In the CHM file, the cross refs which appear to work OK (green courier) are now just courier.
    The ones which failed to pick up the courier look the same as they do in Frame (just green).
    Any ideas as to what's going on?
    I've tried troubleshooting by clearing the cells, reapplying the para style and default character style, then reapplying the code character style, then replacing the cross reference - which sometimes seemed to fix it but didn't always.

    Arnis Gubins wrote:
    Using two character tags in-line together (a la <hyperlink><Code>) is asking for trouble. IIRC, FM doesn't re-apply these in order on an update and depending upon how they are defined (and what is set to AsIs), the outer one usually wins. .
    So why does the blimmin' dialog invite me to do precisely that, by providing me with a list of all the character styles I have, and allowing me to select as many of them as I like??? /sulks/   Indeed, if Frame still shipped with a printed user guide instead of  stupid "optimised for viewing on iPhones" online webhelp nonsense, I suspect I might very well be able to find an example in the manual of using multiple character styles in that dialog!  If it doesn't want you to use more than one, why doesn't it grey out after you add the first one? /sighs/  The concept is called "cascading styles", it's a fundamental web paradigm! And it works in the main body text - why not in Xrefs!
    Also, I have been very scrupulous to keep my character styles orthogonal so none of their AsIs's mash each other up.
    But, rant over, I shall follow your splendid suggestion for a "Code Hyperlink" style.
    Arnis Gubins wrote:
    Also, x-ref formatting may behave differently in the new Publishing modules depending upon ....
    ...Depending on how badly designed and buggy this new Frame12 feature is, I should say!   The Publish module should not randomly stop behaving in a WYSIWIG manner in completely undocumented fashion just because Adobe couldn't be bothered to code it properly.  /sighs/
    Frankly, for my current project, I've given up trying to jump through hoops for Publish - I'm concentrating on getting the Frame source right and assuming these quirks will be fixed in Frame 13 (or 14, depending on how superstitious they are). Because if I put in ad hoc workarounds for them in Frame 12, I (or a colleague) will only have to undo them later when they're fixed, and by then we'll all have forgotten what the original problem was.

  • Link Character Style to Paragraph in CS5.5?

    I have created a few different Character Styles in Indesign e.g. SM and I want all of the Character Style SM to link to it's definded abbreviation 'Site Manager' in the document.
    Is it possible to link all of that Character Style throughought the document to that part of the document, or must I create all of them individually (monotonously)?

    To anyone this may help in the near future:
    To assign a Text Anchor, select what you want to be the destination (when you click on the link is where you end up): this case Principal Contractor (PC). Window > Interactive > Hyperlinks, click top right button.
    New Hyperlink Destination, From drop-down menu select Text Anchor > Ok.
    Congratulations you've now made your Text Anchor.
    Setting up the Link:
    Now we need to select the actual link itself.
    Select whatever text you like;
    Click top-right corner;
    Insert Cross-Reference;
    Under Text Anchor: you can select what you would like to link to. As you have already defined Principal Contractor as your destination link this will do nicely (and will be your only option selectable if you only did as above);
    Under Cross-Reference Format > Drop - Down menu > Text Anchor Name: This is where you select what you wish it to be displayed as. You should create your own by clicking on the pen to the right > then the little + at bottom left corner.

  • Why is the character style for hyperlinks not displaying correctly in design mode/viewing/output?

    I am using RH9 and generating WebHelp, and I needed to globally bump up the font size of just my hyperlinked text. I went into my Style Sheet > Character tab, changed the font size of the various character settings for hyperlinks, and clicked Apply and then OK. Normally, this would change all of my hyperlink text font sizes immediately across all of my topics. However, this time, it made no changes to any existing hyperlinked text, and it only affected new hyperlinks that I subsequently added. For the existing hyperlinks, I can only manually change the font size of the each hyperlink one at a time, but that's crazy (there's 100's in this help).
    I can successfully change other characters styles and paragraph styles. This issue only affects the hyperlink character styles. It also shows up in all RH modes - Design mode, viewing, and in the final output.
    Is this an indication of a corrupted style sheet or some other combination of events that I have yet to discover?

    Hi,
    You probably have inline styling in your project overwriting the font size of your style sheet. How are you changing the font size of the individual hyperlinks?
    There is a workaround for inline styling: Open your CSS in notepad and add !important after the font-size:
    font-size: 4pt !important;
    Note that this is a workaround, not a solution. As a solutions you can remove all the style attributes from your hyperlinks to force them to take the CSS styling again.
    Greet,
    Willam

  • Unable to reset some settings values in Character Style Options back to "inherited"

    Hi!
    First, unfortunately Paragraph Styles and Character Styles are not so cool as in InDesign in Photoshop. I hope it will be updated in future versions because good typography is very actual now.
    Here is one of issues:
    I can't set Font Family and Color in Character Style Options back to inherited ones, i.e. to reset/empty it. Onse I set some custom font/color for Character Style (manually or after "Redefine..") I can't remove it, only set new one. And since Character Style is another level of abstraction over Paragraph Style this behavior is very annoying - I always need to check what font is set up for characters, change it or even delete this character style and create a new one with same settings but default (empty) font family.
    Fortunately some other settings (font size, leading and all other inputs/selects with editable value) can be reset (emptied) - that's why I consider situation with font family/color as buggy/raw.
    What do you think about this? May be I don't know some secret tricks/technics to fix it?
    Thank you

    I purchased the same laptop from Wal-mart in late August, I have had nothing but problems. Going from one program to another within the computer takes forever, the pages constantly say "not responding", getting on the internet takes all day, anti virus software has been installed, scans have been run which might I add took three days to do because the computer kept freezing and I  had to manually restart. Un-installing programs is next to impossible as every time I start and sit and wait 10 minutes later I am still waiting, try to get out of the program and it won't let me. I try ctrl alt del which doesn't help. I took mine back to Wal-mart a week over the amount of time they allow for returns which is ridiculously short and they would not take it back. I have spent numerous hours trying everything under the sun to get this 2 month old computer to work and to meet up to my expectations of a brand new laptop computer and I am almost ready to chunk it out the backdoor. I am very disappointed in this product and will never buy another Toshiba. My family owns a Dell laptop and 2 HP laptops and we love them. This laptop was purchased for my children to do schoolwork as they are homeschooled and unfortunately they have not been able to do ANY! Take my advice, DO NOT BUY this product!

  • 'Highlight' Character Style -- Why Does the Font Change?

    I want to define a style that mimics a highlight marker.
    Choose some text, set the background/fill to yellow.
    Highlight filled words, then choose 'Define Style From Selection..."
    Then, in the More... selection I deselect every attribute of the character style except for the fill colour. So this should highlight text, but leave every other attribute of the text unchanged -- I think.
    But whenever I apply it, the font changes to something I don't recognise -- even though the font is not a part of the character style description.
    What am I doing wrong?
    TIA

    You need to make sure the font is embedded in the PDF. This is optional in some sofware.
    If it is not embedded, your local font is used. No such local font exists on the iPad.

  • Sql item - get url from page

    Hi I'm trying to display a menu from a table, and then I want to mark the current page in that menu by reading the url of the current page.
    This is what i've got so far:
    DECLARE
    loc Varchar2(40);
    BEGIN
    loc := htp.script('document.url');
    htp.print('<table border=1>');
    for rec in (select id, name, parent_id, url from fgj_menu where parent_id=0) loop
       HTP.print ('<tr>');
       HTP.print ('<td><a href="' || rec.url || '">' || rec.name || '</a></td></tr>');
       for rec2 in (select id, name, parent_id, url from fgj_menu where parent_id = rec.id) loop
    if rec2.url = loc then
       HTP.print ('<tr>');
       HTP.print ('<td>  >> <a href="' || rec2.url || '">' || rec2.name || '</a></td></tr>');
    else
       HTP.print ('<tr>');
       HTP.print ('<td>    <a href="' || rec2.url || '">' || rec2.name || '</a></td></tr>');
    end if;
    end loop;
    END LOOP;
    htp.print('</table>');
    END;fails on 4th line :
    loc := htp.script('document.url');Any suggestions?
    Message was edited (format edits) by:
    Botzy

    Hi Botzy
    You can put your javascript code in an HTML portlet, but I prefer to put a page under htdocs, it's much easier to develop, and then use an url item that displays the url directly in the page.
    About the code :
    var xhr_object = null;
    if(window.XMLHttpRequest) // Firefox
         xhr_object = new XMLHttpRequest();
    else if(window.ActiveXObject) // IE
         xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
    xhr_object.open("POST", "/portal/pls/portal/my_schema.my_proc", true);
    xhr_object.onreadystatechange = function()
    if(xhr_object.readyState == 4) alert(xhr_object.responseText);
    xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xhr_object.send('p_param1=value1&p_param2=value2');
    That's really simple to use, you just have to change the name of your proc and its parameters, and you'll get what it "htp.prints". Be sure to grant exec to public on you proc.
    By the way, I've just imagined an even more simple solution :
    - do not pass any param to your procedure. Let it just write always the same code whatever the page it is on
    - identify each entry of your menu with a javascript id, for instance
    <table>
    <tr><td id="url1">page 1</td></tr>
    <tr><td id="url2">page 2</td></tr>
    etc...
    Then use a small javascript code at the end of your page with something lie this :
    document.getElementById(document.location.href).style = a different color
    or
    document.getElementById(document.location.href).innerHTML = something different
    or whatever you want.

Maybe you are looking for

  • About SWFVISU

    Hello gurus! I have a question about the parameters that can be managed in SWFVISU. We have two visualization parameters: ID, in which we send the PCD of the iview we want to attach to the task and DYNPARAM, in which we call the WI ID of the task wit

  • Upgrade Plug-ins Error, Cannot Open

    I am unable to open a file I have worked on on my computer previously. I'm using CS4 6.0.6. When trying to open the file I get the error in the image below.

  • Do I have to purchase Photoshop Touch or other touch apps for my phone with active CC subscription?

    I signed up for photographer program combo PSCC and LR5. Touch apps downlouad was enabled in CC desktop. But now I wonder if I have to pay for download to my phone from Play Store

  • Reg ISO Code for UoM

    Hi , We made change to ISO code of UoM and it is set as primary key. After changes the system was giving error for the new ISO Code with Idoc not getting triggered. Please suggest how to proceed and solve the issue.

  • Download update 2.1

    Has anyone downloaded it and noticed any HUGE changes??