/    Sign up×
Community /Pin to ProfileBookmark

[HELP]Some Function string in Java script external linking of pictures

Hi! I am new here, I’ve started web developing a couple of weeks ago, and since I only have a little knowledge of java scripts I have also couple of questions…

I am modifying a new website which generates images from other site(photobucket, ripway, etc.)
I collected this scripts from the site, but if I use these scripts, I won’t get the images cause it is not in my web files, so I will use the images from my other site(external linking of images)…

Can you teach me how to correct these scripts?

Please help, and thanks in advance!

[CODE]//Determines Path for URL
function pathOnly (InString) {
LastSlash=InString.lastIndexOf (‘/’, InString.length-1)
OutString=InString.substring (0, LastSlash+1)
return (OutString);
}[/CODE]

[CODE]//Make into display Gif Format
function showGraf(fn)
{var extension = “.gif”
UrlPath=pathOnly (location.href);
picName = fn + extension
DisplayPic = UrlPath+fldr+picName
ShowPic='<IMG SRC= “‘+DisplayPic+'” ALT =”‘+fn+'” WIDTH=”‘+picWd+'” HEIGHT=”‘+picHt+'” ALIGN=”BOTTOM” NATURALSIZEFLAG=”3″>’
return ShowPic;
}
[/CODE]

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@ArvilauthorMar 10.2008 — [i]I can't find the Edit button :mad: [/i]

[UPDATE]

I think the manner of my question is wrong...

So I now want to know how can I convert these scripts, when I don't have the directory for the images it request?

COz I want other hosting site to produce it...

Is it possible?

[CODE]//Determines Path for URL
function pathOnly (InString) {
LastSlash=InString.lastIndexOf ('/', InString.length-1)
OutString=InString.substring (0, LastSlash+1)
return (OutString);
}[/CODE]


[CODE]//Make into display Gif Format
function showGraf(fn)
{var extension = ".gif"
UrlPath=pathOnly (location.href);
picName = fn + extension
DisplayPic = UrlPath+fldr+picName
ShowPic='<IMG SRC= "'+DisplayPic+'" ALT ="'+fn+'" WIDTH="'+picWd+'" HEIGHT="'+picHt+'" ALIGN="BOTTOM" NATURALSIZEFLAG="3">'
return ShowPic;
}[/CODE]
×

Success!

Help @Arvil spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.21,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...