Javascript with links
Ive found a great javascript news ticker but I cant get the
text to link to their news stories, please help
Logical "and" in javascript is &&
For example:
if (temp==line[nextline] &
temp.length==line[nextline].length &
nextline!=lines)
should be:
if (temp==line[nextline] &&
temp.length==line[nextline].length &&
nextline!=lines)
Mick
russell van gravy wrote:
> Ive found a great javascript news ticker but I cant get
the text to link to
> their news stories, please help
>
> // JavaScript Document
> <!--
>
> /*
> Typing Scroller
> Submitted by [email protected] (hp:
>
http://www.angelfire.com/nt/bengaliboy/)
> With modifications by Dynamicdrive.com
> For full source code, usage terms, and 100s more
scripts, visit
>
http://dynamicdrive.com
> */
>
> //Secify scroller contents
> var line=new Array()
> line[1]="item one"
> line[2]="item two"
> line[3]="item three"
> line[4]="item four"
> line[5]="item five"
>
> //Specify font size for scoller
> var ts_fontsize="12px"
>
> //--Don't edit below this line
>
> var longestmessage=1
> for (i=2;i<line.length;i++){
> if (line
.length>line[longestmessage].length)
> longestmessage=i
> }
>
> //Auto set scroller width
> var tscroller_width=line[longestmessage].length
>
> lines=line.length-1 //--Number of lines
>
> //if IE 4+ or NS6
> if (document.all||document.getElementById){
> document.write('<form name="bannerform">')
> document.write('<input type="text" name="banner"
size="'+tscroller_width+'"')
> document.write(' style="background-color:
'+document.bgColor+'; color:
> '+document.body.text+'; font-family: verdana;
font-size: '+ts_fontsize+';
> font-weight:normal; border: medium none"
onfocus="blur()">')
> document.write('</form>')
> }
>
> temp=""
> nextchar=-1;
> nextline=1;
> cursor=""
> function animate(){
> if (temp==line[nextline] &
temp.length==line[nextline].length &
> nextline!=lines){
> nextline++;
> nextchar=-1;
> document.bannerform.banner.value=temp;
> temp="";
> setTimeout("nextstep()",10000)}
> else if (nextline==lines & temp==line[nextline]
> temp.length==line[nextline].length){
> nextline=1;
> nextchar=-1;
> document.bannerform.banner.value=temp;
> temp="";
> setTimeout("nextstep()",1000)}
> else{
> nextstep()}}
>
> function nextstep(){
>
> if (cursor=="\\"){
> cursor="|"}
> else if (cursor=="|"){
> cursor="/"}
> else if (cursor=="/"){
> cursor="-"}
> else if (cursor=="-"){
> cursor="\\"}
>
>
> nextchar++;
> temp+=line[nextline].charAt(nextchar);
> document.bannerform.banner.value=temp+cursor
> setTimeout("animate()",50)}
>
> //if IE 4+ or NS6
> if (document.all||document.getElementById)
> window.onload=animate
> // -->
>
Similar Messages
-
How to use Spry validation with link styled submit buttons..??
I'm working with a theme package that comes with a bunch of button styles that work with basic links. For example:
<a href='page.html' class='small-button smallblue'><span>Button Label</span></a>
I've got a basic form setup with Spry validation, but the submit button needs some styling to make it look nice with the site. Since there are already styles ready for me to turn links into buttons I figured I'd use the same thing for my submit buttons.
To accomplish that, I'm using the following javascript...
<script type="text/javascript">
function submitForm() {
document.getElementById("form_name").submit();
</script>
And then I'm updating my submit button to something like this...
<a href='javascript: submitForm()' class='small-button smallblue'><span>Button Label</span></a>
When I do this, the form submits as expected, but the Spry validation doesn't work. Is there a way I can make the Spry stuff work with these types of buttons? I know I could create separate styles for the submit buttons themselves, or I could use an image type button, but I'd really like to figure out how to get these existing styles to work for me since the theme already has so many of them done for me.
Any information on this would be greatly appreciated. Thanks!Save yourself a lot of trouble and style the normal submit button as per
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">
<style>
.Standout {
font-family: Geneva, Arial, Helvetica, sans-serif;
text-transform: uppercase;
color: #FFFFFF;
font-size: 16px;
background-color: #CC0000;
font-weight: bold;
border-style: none;
padding-top: 6px;
padding-bottom: 5px;
padding-right: 64px;
padding-left: 64px;
letter-spacing: 1px;
.Standout:hover {
background-color: #000000;
</style>
</head>
<body>
<form action="" method="get" name="myform">
<span id="sprytextfield1">
<label for="text1"></label>
<input type="text" name="text1" id="text1">
<span class="textfieldRequiredMsg">A value is required.</span></span>
<input name="input" type="submit" class="Standout">
</form>
<script>
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["blur"]});
</script>
</body>
</html>
Gramps -
RH11 TOC "book with link" icon
Hello! I have a question about customizing the TOC icons in RH11. I used the Responsive HTML5 Settings GUI to change all the TOC icons... EXCEPT the open book with link. This appears to be pulling a .png from the template resources folder, but there is no way to change it in the output settings within RH11 itself. Can I edit one of the Javascript files get it to pull a custom icon? Or am I stuck with the default icon? (In the image below, it's the third icon down.)
Thanks!I have moved this post to the correct forum. Please take a look at the sticky topics.
Willam is our resident guru on these matters but pending his confirmation, I think the solution is to locate the image in the template folder and substitute it with what you want, using the same name and backing up the original in case.
See www.grainge.org for RoboHelp and Authoring tips
@petergrainge -
Can Javascript text link in PDF?
Is there a way to insert a javascript text link in a PDF? I've added web links to text, but I just want to insert some javascript so when the user clicks on the text, it runs my script
I post problem in many forums but not got the best answer
any help would be greatly appreciated!
ThanksJust create a link with the Link tool and specify a JavaScript action.
George -
Use Javascript with InDesign buttons?
I haven't been able to find ANY info about this anywhere, but I'm wondering if it's possible to call a Javascript function from an InDesign button, instead of link to a web address. This can obviously be done in Flash, but the same syntax that works in Flash does not work in InDesign. I'm not referring to the Scripts panel here - I'm talking about using Javascript with a button created in InDesign. I tried calling a JS function with the GetURL action, to no avail.
If anybody has ever done this, please post a sample of the correct syntax for a JS function call, as well as which action I should use. Many thanks in advance!(Edit: I'm talking about ID CS4/CS5 SWF export, naturally)
I don't know why, but the following URL (using a global javascript function) seems to work, somehow;
javascript:alert('testing');
Arbitrary function names do not work - browser just says "function not defined" - although the same stuff works in Flash. For example;
javascript:myFunction();
Also, there seems to be very little info on which (button) properties are included in the SWF export.
Additional information on the subject would be much appreciated here, too. -
Hi!
Can anyone tell me (or just give me a relative URL) how I can interact Javascript with an applet? For example when I press a link within the html page something to happen within the applet.
Thanx
AthanHello,
Give something like this a try.
If you have something similar to the following embedded
in your html page:
function idBtnConnect_onclick() {
returned = document.CA.CallFromScript(x, y);
<body>
<APPLET id="CA" codeBase=".\jar" height="200"
archive="entappletbase.jar, entappletuser.jar,
entappletp7.jar" width="200"
code="ClientApplet.class" MAYSCRIPT="true" >
</APPLET>
</body>
You should be able to reference a function in your
applet as follows:
public String CallFromScript(int x, int y)
return "Your call was successful!!";
The function in the applet is invoked by calling the function through referencing the applet ID (CA) from inside the document. document.CA.CallFromScript(x, y);
Note that we not only pass information into the function, but we are also able to have a string returned.
Leslie -
Problem with linking images in form
Dear Personnel,
I am using live cycle designer 9.0.Using this i created forms. And i want to load images dynamically to an image field or to an image object.As per the Adobe team,using the href link- i can pass the url of the image.I have supplied that.But the thing is that when i save the form, size of the form takes the size of the images too ,eventhough i didnt embed the image to the form.
I have tried javascript to link to image in the form:ready event but that too doesn't work for me.The main thing i need is to reduce the size of the pdf.So i just want to link images to the form whenever it is opened only.
I have asked many times and no one replies............please try to solve this................Thanks for the information! I think that maybe it is the 2 color transparency issue that I am having. Some of my images have 2+ colors in them in addition to a transparent background.
This is kind of a silly limitation for LiveCycle honestly, because many people use PNG files with more than one color!
I will try to scale down the amount of colors or use JPEGs instead - thanks!
Best Regards,
Ashley -
Applescript "do javascript" click link
Hi, I want to make a script that opens a web page in Safari, then clicks on a link. however the link is javascript, with a self referrential href
Does this code look like it should be working, becuse it jsut gives a blank page.
on run
launch application "Safari"
tell application "Safari"
make new document at end of documents
set URL of document 1 to "http://www.biggercity.com/chat"
do JavaScript "bcStartCamsOnly()" in document 1
(*actual link is *)
end tell
end runBlah nevermind - pretend I never asked this question....
-
A PDF document with links to other PDFs corrupts the URL and get 404. Works in IE.
One of our supplier sites has manuals online that are PDF docs with links from one to another. For example, when I click on "Tanaka" I get a PDF menu of Tanaka service manuals, etc. When I click on a section, such as "Chainsaw" I get a 404. Part of the directory structure in the URL is missing. For example when in the Tanaka PDF menu I click on Chainsaw I go to http://www.parklands.net/Resources/Tana%20CSaw%20Menu.pdf which is wrong. It should be http://www.parklands.net/Resources/Tanaka/Tana%20CSaw%20Menu.pdf, and in IE it is.
== URL of affected sites ==
http://The linked documents will not be automatically converted to PDFs and merged
with your file, neither in Acrobat Standard nor in Acrobat Pro. You can do
it, but you'll need to do it manually by converting all the files to PDFs,
merging them and then adding the links between them. -
Problem with links on email templates
Problem with links on email templates
Hi,
We have been having issues with links on our email templates. Some of the links point to the following URL:
http://server'sname/thirdparty/FCKeditor/editor/fckeditor.html?InstanceName=emailTemplatesDTO.htmlBody&Toolbar=NewscaleFCKEditorToolBar#URL
Sometimes we get “Unknown internal error” on the web page.
Can anyone help or advise on how to resolve this issue?
Many thanks,
Wesley.Hi Wesley,
This is rather late, but we've seen the same thing frequently (and I believe can replicate it). It's caused when you a creating a new email by copying the content of an existing one with a name space in it.
Upon copying, the link gets scrambled. The approach we use is to copy the email in to a new template, then strip out all of the URL links and add them back in.
Thanks!
Ant -
Problem with links for external user
Hi,
We´re using SAP NetWeaver Portal 2004s SPS 10 and we have a problem with links within notification-mails:
The link to the document (e.g. within a subscription mail) consists of "http:///...". Only user using the portal within our network can open this links. All external user can´t open this links. How can I change the URL so that our external user can open the links, too?
Thanks for help,
Sven KellerWe already have another URL for external usage. My problem is how to define that created links to documents and folder are automatically using the external URL.
If somebody receives an email (e.g. subscription) the URL to the folder is:
http://<portalserver>:51000/irj/go/km/navigation/documents/Public Documents/Documentation
But it should be:
https://<externalportal>/irj/go/km/navigation/documents/Public Documents/Documentation
Message was edited by:
Sven Keller -
I am having major issues with links in keynote! Even though the links (a navigation system) are on the master page, they are only working on some of my slides. Anyone have ideas on how to fix this or similar issues? Help!
I have created a navigation system on the master pages and set the presentation to links only mode. I also have other links scattered throughout the program, like a linkable table of contents, etc. Some of them work, some of them don't. Not sure why. Anyone out there having similar issues? Or have any idea on how I can solve this issue? Any help would be appreciated!
Thanks!Links should not create any problems in Keynote. If they are set up correctly on text, the text will be underlined. Objects that have links will have a curved arrow bottom right, if you click the arrow a popup will display the link information.
Try this repair for Keynote, ensure you complete all the tasks and in the order shown:
1
delete all the iWork applications if you have them, not just Keynote, using Appcleaner from Mac Update, its a freeware application
2
empty the trash: Finder > Empty Trash
3
Shut down your Mac, wait 30 seconds, then power on the Mac, immediately after the start chime, hold down the Shift key
When you see the grey Apple symbol and progress indicator (a spinning gear), release the Shift key.
If you are prompted to log in, type your password, then hold down the Shift key again as you click Log in.
4
Let the Mac fully boot up, it will take longer as the OS is repairing the drive
5
when fully booted, go to Applications > Utilities > Disc Utility; click on the boot drive then First Aid tab and click repair disc permissions
6
when complete, restart the Mac normally, Apple menu > Restart
7
install Keynote from the Mac App Store
let us know if this helped -
How can I open an app from an e-mail link that is associated with link.
I get e-mails with links in them all the time (from forms, online shopping, etc). Some of those links are for websites that have an iphone app associated with them (especially forums). When I click on the link it tells me as much, and if I click "ok" to that dialog, it takes me to the App Store and to that specific App, where I can download it. Even when I have that app installed, rather than taking me to that app when I click on the link, I get the dialog again telling me that there is an app associated with their website (which I already know because I have the app). Is there any way to get these links to open in the associated App, rather than trying to open them up in the browser?
This question has been answered before, see the page linked below:
https://discussions.apple.com/message/15123175#15123175 -
How can I use Automator to open and save Word docs with links?
Hi-
I'm having trouble building a Workflow to open and save Word docs with links.
My Workflow so far:
1. Get Finder items
2. Copy Finder items (to new folder)
3. Rename selected items
4. Open selected items (Word docs)
Three problems occur.
The first is a Word 2004 problem -- I can't get the warning "This document has links in it; do you want to open it with/without updating the links" to go away (Unilke the Macro warning toggle capability, there is nothing in the Preferences for Word 2004 that addresses the links warning, as far as I can tell; any insight you can shed on this would be terrific.)
The second problem happens with Automator: if I manually accept the update of the first document's links, Automator opens that document but then halts completely, even though I've instructed it to open multiple documents.
The third problem I have is that there's no Finder action in Automator that allows me to save the document that's now open (as far as I can see).
Any suggestions for how to fix? If I can get this to work, and scheduled in iCal, it will be an unbelievable time saver.
Thanks,
Jeremy
PowerPC G5 Mac OS X (10.4.6)Hi there Jeremy,
to do this you are going to have to add in some Run AppleScript steps...
These will rely on GUI Scripting. So first you need to activate GUI Scripting.
Now we need to add in a Run AppleScript action to the end of your workflow...
This will replace your current number 4 in the workflow (Open Selected...)
click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">on run {input, parameters}
set allItems to every item of input
repeat with currItem in allItems
tell application "TextWrangler"
open currItem
end tell
activate application "TextWrangler"
tell application "System Events"
tell process "TextWrangler"
delay 2
--when the Word document is opened I have told it to press okay !
--I don't know what key you want it to press in the dialog box
keystroke return
delay 2
--save the doc
keystroke "s" using command down
delay 5
--close the doc
keystroke "w" using command down
end tell
end tell
end repeat
return input
end run</pre>
The above script should open each Word Document, press a button in the dialog box then do a save and then close the doc...then loop through the rest of them.
You need to replace the name Text Wrangler with Microsoft Word (or whatever it is called!), I don't have it on my Mac.
You will have to let me know what button needs pressing in the first dialog, if it isn't the 'highlighted ' one then we will have to amend the script...
regards
Ric -
How to setup word docs, converted to PDF on local drive with links to a second file at a page
how to setup word docs, converted to PDF on local drive with links to a second file at a page
Need to setup a set of word documents, converted to PDF that has links from one file to a second file at a given page.
I would like to setup a set of pdf documents, on the hard disk of a PC or Mac, that can be open with acrobat pro running on the same computer and have the link jump to, and open in a new window, in acrobat pro, to a given page of a second document in the set.
Is there a way to setup a link in word and the conversion to pdf that will result in a link that is equivalent to the acrobat link type you get when you add a link of the type Go to a page in another document?
Tools-Advanced Editing-Link tool, make a box
Check: Go to page view, Next (Create go to view dialog opens)
Open second document and go to page
Click “Create go to view dialog” to set up link
Result is a link, when view by link properties, with an action of
Go to a page in another document
File: C:\My Documents\second file.pdf
Page: 43
Zoom level: Custom
I got close but did not solve the problem:
I have a version that uses links to a website, using #page=43 at the end of the hyperlink.
That works but will only open to the page if is through the web browser, opening the acrobat reader plugin.
I need to open from a folder on the local harddisk (with relative links), in acrobat pro to the given page of the pdf, on a PC or a Mac.
I could bookmark each page “pagenumberxxx” and jump to the bookmark/page if that would get around some problem
Current Systems in use to create documents with links and view them:
Windows XP SP3
Word 2003 SP3
Acrobat 9 pro version 9.4.4
Or just to view them:
Mac OS 10 Lion version 10.7.4
Acrobat 9 pro version 9.5.1
(note I have limited understanding of Mac’s)
JohnNo. There seems to be no automated way to do it. You can of course go into the PDF and manually add links after you have converted to PDF, but that is what we want to avoid having to do. We want it to be automatic from the Word doc.
Maybe you are looking for
-
CSA 6.0 will not install. Crashes on Patch Information.
I have tried to install CSA 6.0 a few times and it crashes on "Unable to load patch information into database. setup will now abort". can anyone tell me why this keeps happening. I have installed 5.2 just fine but I want to use 6.
-
I have been getting the following error while trying to call a web service on the server with https protocol from a client class. [java] java.io.IOException: unable to find resource:https://localhost:7002/basic_javaclass/LoginUser?WSDL [java] at webl
-
Why don't have the option of using the mackie control to use consoles with motorized father
In the audition 3.0 this option is ready with not in this version?
-
Scripts need to be updated for use from Bridge to Photoshop. Broken with CC2014
Nasty news. One cannot (though Adobe advises!) run the Uninstaller for Photoshop CC. It removes the Bridge: Tools: Photoshop scripts, i.e. "Image Processor." I reinstalled the older (CC) version, and the scripts returned-HOWEVER-the scripts STILL don
-
hello my problem is that my iphone 3gs is just turning off even though its 76% or 56% percent charged i went to the phone store and restored it and then synced it to my mac as a new phone but its still turning off.i even deleted some music to see has