PDA

View Full Version : help with my code to get my path working right..


chal7ds
04-30-2010, 08:24 AM
Hi,

I am trying to get my dreamweaver document's html to work online. Right now, only the 'test' works (F12), but when I test the html online, it just shows my .swf as a blank white box, instead of the animation loop it should be showing.

Here is what my code looks like:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>example</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="1050" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="1050" height="750" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="1150" height="750">
<param name="movie" value="home/chalart/public_html/djskull/example.swf">
<param name="quality" value="high">
<embed src="home/chalart/public_html/djskull/example.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1150" height="750"></embed>
</object></td>
</tr>
</table>
</body>
</html>


is there anything wrong with my path? Both the .swf and actual .html file
are located on my server. the path of the server is i believe is correct from what i could understand from how my server presents it, but am i
supposed to maybe have a full internet address in there or something?

please advise as i don't have any experience with how the path should be
set to make it live online..

Corrosive
04-30-2010, 08:34 AM
Your path does look a bit wrong. I'd expect public_html to be your website root folder. I.e. where your index and other pages sit.

home/chalart/public_html/djskull/example.swf

Is 'djskull' your site files folder?

If you want an absolute path then go for something like;

http://yourdomain.com/djskull/example.swf

This might help a bit; http://www.corrosiveonline.co.uk/tutorials_folder_structure_file_paths.php

chal7ds
04-30-2010, 09:59 AM
Yes, djskull is where my files are sitting.

I tried changing the path to start with http://mydomain.com/ but it didn't
do anything (I used my own domain, obviously)

Does there have to be any middle stuff between domain.com/ and the public_html/djskull part, because if there does, I don't know how to find that middle stuff on my control panel online..it doesn't show it anywhere. it just says at the top that my start path is: home/chalart/

Also, which part or parts do I change in the Dreamweaver code? the movie value AND the embed src? or just one? should they both be paths to example.swf? or should they lead to index.html instead? or one having one of those and the other having the other? know what i'm sayin?

cause right now if i change them both to a full http path with the example.swf at the ends, it doesn't work, it's still blank

Corrosive
04-30-2010, 10:09 AM
It seems to me your folder/file structure is a bit of a mess. Did you read through the article I linked?

chal7ds
04-30-2010, 01:20 PM
I read it, but it only confirmed what I already have done. I mean, all my images/pages are in my djskull folder already (which is in my public html folder) so it's already 'organized' as is.

I did notice a problem though. If I try to 'view' my index.html within my control panel djskull folder, it shows a bunch of code instead of the animation swf actually playing like it should. This might have something to do with why when I go to test the html online that it only gives me a white box.

Not sure why it's doing that though since when I 'test' the Dreamweaver file, it plays it perfectly.

chal7ds
04-30-2010, 01:33 PM
it's weird..my index page just shows code and doesn't work..but my swf works just fine (if i'm viewing it from my control panel server's link)

chal7ds
04-30-2010, 01:46 PM
is there any reason you can think why my index.html page just shows code? I really think therein lies my problem... but I can't figure out why it doesn't work ?

DWcourse
04-30-2010, 02:36 PM
Send us the online link. But basically you need to learn about how paths actually work on a website. To work online your link should probably be /djskull/example.swf since public_html is the root folder for your website. The link your using is the path from the root folder of the server.

chal7ds
05-01-2010, 08:13 AM
This is what the link looks like:

http://www.constanceanderson.com:2082/frontend/x3/filemanager/showfile.html?file=index.html&fileop=&dir=%2Fhome%2Fchalart%2Fpublic_html%2Fdjskull&dirop=&charset=&__cpanel__temp__charset__=&baseurl=&basedir=

To me, it seems odd that the link is all long like that and not a straightforward path, but that's what the server provided, so I don't know if I'm supposed to change it somehow or not worry about it or what.

You'll notice if you go to the link how it just shows code? It should be showing my animation (just like when I hit F12 in Dreamweaver, I'm able to see the animation work WITHIN the index page, so I don't get why it's not working when I upload the index to the server?)

Any help would be much appreciated, thx

Corrosive
05-01-2010, 08:27 AM
No, that's the full link to your file via your hosting control panel! You were closer before. If 'public_html' is your root folder then all files should sit in there. HTML at the root level and then flash, js, includes etc. in named folders.

You seem to be working on an add-on or sub-domain but don't have it set up correctly on your hosting.

chal7ds
05-01-2010, 09:21 AM
but all my files ARE IN my public_html folder..well..they're in the djskull folder that is WITHIN the public folder. Should I move all my files from the djskull folder to the public_html folder? You think that would fix it?

The thing I don't get is that I set up my remote access in DW and typed that path though: public_html/djskull so I thought DW would be able to deal with that? maybe the index isn't supposed to go into a sub-folder?

Corrosive
05-01-2010, 09:47 AM
99% of hosts are geared up to have index.html in the public HTML folder as the first page to 'land' on. It seems a bit mad to build your site within another folder. When you set up your site definitions you just want to stipulate that /public_html/ is your root. In some cases through cPanel hosting (and depending how your FTP account is set up) you can even leave the field for your 'host directory' blank and it will find the public folder.
You've made a rod for your own back with this one.

chal7ds
05-01-2010, 10:21 AM
ok, question. do the root folders (the ones on your drive that DW uses) not the ones on the server) have to match name-wise with the folders on your server, or is it ok if the names differ?

For example, my images are located in 'series 2' folder on my drive; however, on my server there's a folder called 'images' in the public html folder. Should those match or does that not matter?

Also, for the .swf, should that go in the cgi-bin folder on the server? or is it ok for that to sit in the public html folder along with the index.html page?

DWcourse
05-01-2010, 12:18 PM
Are you aware that the domain http://www.constanceanderson.com redirects to http://www.anderson-and-associates.org/ ?

And, yes the local directory structure must mirror the structure on the server. And if you had you site defined correctly (aee http://www.dreamweaverclub.com/define-your-site.php ) you probably wouldn't have these issues.

chal7ds
05-01-2010, 12:58 PM
Apparently, I have a LOT to learn here lmao

yeah, I was aware of that site, that's a site someone I share this server hosting with did for a client but I want to keep that site and have a new one (my own), so I probably have to create a new domain I'm assuming, right? I see in my server there's a domain creation section. I was thinking I could just put my files in the 'files manager' area on the server but I guess that's part of the anderson associates site..

I'll get back to you guys after I've gone over this define site and let you know how it goes, thanks for your help!

Corrosive
05-01-2010, 01:47 PM
OK, if you want to have an add-on domain then select that option in cpanel and create a whole new website. Have an FTP account that links straight into it and its own public folder.

DWCourse is right that your local file structure should match your site file structure or you'll get in a terrible mess..... ;)

chal7ds
05-01-2010, 06:10 PM
Cool, I understand. But it's weird..can you answer me why the 'file manager' on my server doesn't make the index.html work? why is the file manager on the server linked to anderson associates site? when you click in there, there's a public html folder in there too..and the feeling I got from when I first went in there is that that was the 'general' place to put a site's files because i don't see any of anderson associates' files in there at all. anderson associates files are in the public html of it's own domain. if an index html doesn't work for my file, what good is that file manager for? why have a file manager when apparently, you're just supposed to create a new domain (and thereafter creating a new public html folder)?

chal7ds
05-01-2010, 07:07 PM
Okay, I created a new domain. I defined my site via Dreamweaver. However, when I try going to my new domain, the site doesn't work. I typed in: http://www.example2.com/ I made sure to put all my files (index.html, example.swf, etc.) into the public_html folder of my new domain and I created a 'images'folder with all my images (also putting images as my default location in the default images folder within the site definition dialog box) and I still cannot get the site to load up?!? anderson and associates.org works fine, but mine won't. ugh. what am i doing wrong now?!

chal7ds
05-01-2010, 07:37 PM
Nevermind, fixed this problem by relocating the public folder to a more simplified path.

chal7ds
05-01-2010, 07:57 PM
Ok, I figured out that my added domain actually does work if I type the main server address 'before' it, it just doesn't work on it's own I guess because I haven't registered the domain. But, at least now I know I have a link that will make my page work online. However, when I go to put the Dreamweaver code and paste it in an html tester online, I still get the white box thingy. I don't get it. If the link works on it's own to go to the page, then that means DW's code it messed up somehow. Keep in mind, I've changed the 'example.swf' on the embed src= and the move value= to the new link, so shouldn't it be working??

Corrosive
05-02-2010, 09:03 AM
So have you made the link relative or absolute and can you post the code here please?

chal7ds
05-02-2010, 01:53 PM
it never asked me anywhere to make something 'relative' or 'absolute' during the define site process?! not sure what you're on about...can you be more specific?

Corrosive
05-03-2010, 06:33 AM
An absolute path includes the URL of the site. A relative path just refers internally to the folder or file.

chal7ds
05-03-2010, 07:46 AM
Oh i see what you mean. No, it's for sure an absolute path. It's starts with http:// so on and so forth and ends with the domain name i added. Link works; however, it doesn't work when i try using it within the DW code to replace it where those 2 'example.swf' parts were. Which, makes me think, it's probably something wrong with the code now, but how could that be since DW writes the code for you. I mean, all I did was pretty much drop in the swf into a table..should be fairly easy I would imagine to conjure up proper code for that.. ;P

Corrosive
05-03-2010, 08:04 AM
You'd have thought wouldn't you... I gave up letting DW write code for me a long time ago.

chal7ds
05-03-2010, 10:32 AM
lol. yeah, well, i'm the kinda guy that never learned html at any point yet, so I was hoping it would make it easier but apparently, learning how to write html on your own might be a better solution, as DW seems to be a piece of crap!

Corrosive
05-03-2010, 10:43 AM
To be fair to DW it is more about the attitude of the person using it. If you think it will build a website without you knowing what is going on in the background then you will be disappointed. Approach it as a development tool to improve your workflow and efficiency and to shortcut some of the code you should already know how to write then it is first class.

Learn Dreamweaver alongside learning what HTML and CSS does then you'll have all the tools you need to develop websites to a really high standard but it takes a while so forget 'instant success' but have fun learning a new (and useful) skill :)

chal7ds
05-03-2010, 02:19 PM
grrrrrreat. lol that's the exact opposite reason why I bought DW, lol

i actually just learned i'm getting a new host this Thursday. That may or may not fix the problem i'm having (since i'm sharing this with another person, maybe that's the prob)

I'll post again in this thread if that changes anything or not and let you know the latest. in any case, i understand your theory :) and i do thank both you guys for all your feedback..

to be continued.

DWcourse
05-03-2010, 07:27 PM
it never asked me anywhere to make something 'relative' or 'absolute' during the define site process?! not sure what you're on about...can you be more specific?

Actually, when setting up the Local Info in your site definition Dreamweaver asks, "Links relative to:" and you have the option to choose either "Document" or "Site root."

In addition every time you add a link to a file or image in your site, when you make the file selection, there is the "Relative to" option and a menu from which you can choose "Document" or "Site root."

Finally, in the same dialog, there is a link which reads, "Change default Link Relative To in the site definition."

The fact that you overlooked these options and don't understand them mean there is a problem with Dreamweaver. Dreamweaver is a tool and whether and how well you able to use it will depend upon how much effort and learning your are willing to put into it.

You need to learn some web basics (and links are the very basics) no matter what tool you use.

chal7ds
05-04-2010, 01:33 PM
The fact that you overlooked these options and don't understand them mean there is a problem with Dreamweaver.


I agree! jk.. :lol:

Corrosive
05-04-2010, 02:10 PM
So, what are you building exactly?

chal7ds
05-05-2010, 04:38 PM
Hey, any reason why an onRelease code would work when testing with Dreamweaver (F12) but not when pasted in to Myspace?

I have a link that goes to another site on the animation but when I put it on myspace, the onRelease code doesnt' work..any idea why?

Here's the code I'm using:

on(release){
getURL(http://www.examplelink.com, "_blank");
}

Does that look right to you? and if it's right, but it's not working on myspace, does myspace have restrictions on certain scripts maybe?