I agree. use the error console in firefox. most times, if it works in FF, it'll work in IE.
I agree. use the error console in firefox. most times, if it works in FF, it'll work in IE.
I'm trying to understand something fairly simple I hope. How to pass optional parameters to a function or object in javascript by the parameter name.
for instance, what script.aculo.us does with their scripts.
syntax example:
Sortable.create('id_of_container',[options]);
live example:
Sortable.create('examplelist',{ghosting:true,constraint:false})
the object has a possibility of 5-10 parameters, all of which have default values, but when you create the object/call the function, you can specify the parameter by name, and pass a different value.
I realize script.aculo.us uses the prototype framework, but I don't quite understand their documentation on all of it. (I'm new it OO javascript).
Any help would be appreciated in either the idea of calling a function and passing optional parameters by name, or even how to use the prototype framework to make an object that has that functionality.
This might be what you're referring to (done with JQuery): http://jquery.bassistance.de/accordion/
this is exactly what I was looking for. Thanks!
Security??? I think of security as keeping people from breaking into a computer and doing damage, or keeping them from stealing Social Insecurity numbers. I don't think of someone downloading an image from your page as a security issue, but a copyright infringement.
Something tells me that copyright will disappear in ten years or less, because the Internet will make it cost-prohibitive to enforce.
For your "security" reasons, you should store the watermarked image on the site, instead of the plain image.
But note that watermark-removal software is easy to write.
yes, excuse me. Copyright is what I meant.
Why do you want to hide images? If you don't want people to see your images, don't put them on the Internet.
You aren't going to stop people from copying your images either. Anyone can do a Ctrl-Print-Screen and recover the image in MS Paint.
The images on the website get watermarked and resized dynamically using phpThumb. Infact, phpThumb can do lots to images. I want to make the image once in Photoshop, and use phpThumb to do the rest. For security reasons, I don't want web users to be able to get to, and use the unformatted images.
Ya I'm using Windows XP Pro. So I need an SMTP server? Can my local system be used as SMTP? or do I need to use an online server for one of my domains?
Similar question. I have apache 2, php 5, wondering what else I need to install or set in the apache config file, or php.ini to get mail() function to work?
use greybox. its open source
http://orangoo.com/labs/GreyBox/
GreyBox can be used to display websites, images and other content in a beautiful way.
Why use GreyBox:
* It does not conflict with pop-up blockers
* It's only 22 KB!
* It's super easy to setup
* It's super easy to use
* You can easily alter the style as it is controlled through CSS
EXAMPLES on the website
yes and no. I use frames using php to SAVE bandwidth and excess coding.
I have my index.php in the root directory, and my "pages" in a pages sub directory.
in index look something like this:
<body>
<div id="nav">
<ul>
<li><a href="/index.php?page=home">Home</a></li>
<li><a href="/index.php?page=contact">Contact</a></li>
<!-- etc -->
</ul>
</div>
<div id="content">
<?php
if (array_key_exists('page', $_GET)){
$cur_page = $_GET['page'];
}
else {
$cur_page = 'home';
}
//include appropriate file
if (isset($cur_page)){
require_once 'lib/pages/'.$cur_page.'.php';
}
else {
echo "uh oh, for some reason the variable cur_page is not set";
}
?>
</div>
</body>
this doesn't use html frames, but DOES use the idea of a page inside of a page. I only have to include javascript files, css files, put code in to open and close the database connection on index.php. Also, the header, footer, sidebars, etc need to be index.php
So, I've scoured the web for a way to block direct access to an image, kind of like hotlinking, but on my website.
For example: going to http://www.mydomain.com/images/someimage.gif should bring the user to a 403 (access denied) page instead of displaying the image. I wanted to do this using .htaccess and for all to know, this is how I did it.
I can use phpThumb (http://phpthumb.sourceforge.net/) to display thumbnails, but someone can also use this to simply "parse" the image, without modifying it in any way (displayed below)
Here's how the .htaccess looks
# normal hotlink prevention requires first 3 lines (3rd line being for my localserver)
# using phpThumb to display my images allows the images to be displayed on the website
# but when tried to access directly ie. http://www.mydomain.com/images/foo.gif
# the user is redirected to error 403 page
# which means I don't need to have those conditions. Infact, with those conditions in place allows users
# to see the images (but still cannot hotlink)
#RewriteCond %{HTTP_REFERER} !^$
#RewriteCond %{HTTP_REFERER} !^http://(www.)?mydomain.com/.*$ [NC]
#RewriteCond %{HTTP_REFERER} !^http://(www.)?mydomain.dev/.*$ [NC]
RewriteRule \.(gif|jpe?g|png)$ - [F,NC]
All images are written in this format on my website:
<img src="lib/php/functions/phpThumb/phpThumb.php?src=/lib/images/foo.gif" alt="foo" />
if anyone has any better way to do this, I would gladly appreciate knowing. This is just something I found out on accident actually.
I currently have some code in my .htaccess to redirect the user to the www version of the website.
IE if typed "mydomain.com" redirects to "www.mydomain.com"
But I also have apache installed on my development machine, setup with virtual hosts and my windows host file modified accordingly so I can go to mydomain.DEV and get to my local version
I want (without needing to modify the .htaccess file everytime I want to view my local version) to have that www rewrite apply for both the .dev and .com versions, anyone know how?
RewriteCond %{HTTP_HOST} ^mydomain.com$ [NC]
RewriteRule ^/?$ http://www.mydomain.com [R=301]
Hi i was wondering how hard it would be to make the div's start closed?
I tried to add a script after the div so that it would run as soon as it was loaded but I couldn't work out what variable I needed to pass to the toggle() function.Thanks
Ya ther eis a way to do that, it's really easy too.
display: none;
you can't put that in an external css for that div, it has to be part of the style attr of the div. Example:
<div class="slide" style="display: none;">
some text here
</div>
that should force it to not be displayed when the page loads. Otherwise, change it to display: block;
I think I know what I was doing wrong. I was trying to modify the "toggle" function, when what I really should do, is create a new function that USES the toggle, to toggle the correct elements...
I could probably make something that toggles, I just need to know exactly what parts of the script make it slide in and slide out. It's not apparent, even with the comments. I'm a php programmer. Javascript is so different.
do you want this information to be dynamically saved somewhere? or just for "eye candy"? as its a backend system that is really what's in charge.
Either way. This script may help you get started.
please explain, in detailed steps, what you want your users to be able to do, as well as what parts of that you need help with. Be verbose. Use examples, code, pictures, etc to help.
http://www.daniweb.com/blogs/showentry.php?entryid=655
In reference to the script made by ben at the above address. I'm trying to decipher how to create a toggle where as, only one "slideblock" can be open at a time. When you try to make one visible, all others "slidein".
Anyone have any ideas? Javascript has always been a pain in my rear-end.