Jump to content

vchris

Members
  • Posts

    1,529
  • Joined

  • Last visited

Everything posted by vchris

  1. vchris

    Triple Loop

    Actually I thought about something during lunch.All that happens when I hover over a navigation image is I load a duplicate of the original image and add an arrow. I could simply add the arrow with css on hover and no need of JS.
  2. vchris

    Triple Loop

    I have this JS file that takes care of my rollovers. I need to add 2 styles (3 total). I want to create loops to declare my rollovers.Currently what I have:home_e = new Image(118,37); home_e.src = '/images/home_e.jpg';about_e = new Image(118,37); about_e.src = '/images/about_e.jpg';portfolio_e = new Image(118,37); portfolio_e.src = '/images/portfolio_e.jpg';contact_e = new Image(116,37); contact_e.src = '/images/contact_e.jpg';home_e_hover = new Image(118,37); home_e_hover.src = '/images/home_arrow_e.jpg';about_e_hover = new Image(118,37); about_e_hover.src = '/images/about_arrow_e.jpg';portfolio_e_hover = new Image(118,37); portfolio_e_hover.src = '/images/portfolio_arrow_e.jpg';contact_e_hover = new Image(116,37); contact_e_hover.src = '/images/contact_arrow_e.jpg';This is only 1 style (will become blue style) and 1 language. I have French and English for each button and styles blue, red, and green.This is an example of what I want:home_red_e = new Image(118,37); home_red_e.src = '/images/red/home_e.jpg';home_red_e_hover = new Image(118,37); home_red_e_hover.src = '/images/red/home_arrow_e.jpg';So is there a way to create some kind of loop to replace all this text?I have 8 buttons total for 1 language (1 base and 1 hover). I have 2 languages (english and french) and I have 3 styles (blue, red, green).I got this so far: //Buttons array var buttons = new Array(4); buttons[0] = "home"; buttons[1] = "about"; buttons[2] = "portfolio"; buttons[3] = "contact"; //Languages array var languages = new Array(2); languages[0] = "e"; langauges[1] = "f"; //Styles array var styles = new Array(3); styles[0] = "blue"; styles[1] = "red"; styles[2] = "green"; var i,j,k; while(i < 4) { while(j < 3) { while(k < 2) { buttons[i]_styles[j]_languages[k] = new Image(118,37); buttons[i]_styles[j]_languages[k].src = "/images/" + buttons[i] + "_" + languages[k] + ".jpg"; buttons[i]_styles[j]_languages[k]_hover = new Image(118,37); buttons[i]_styles[j]_languages[k]_hover.src = "/images/" + buttons[i] + "_arrow_" + languages[k] + ".jpg"; i++; j++; k++: } } }
  3. vchris

    Domain Name

    Don't worry about that. I'm just creating 2 other styles (R,G,B ).
  4. vchris

    style switcher

    But where would the link link to? a page named styleswitcher.php and take a querystring then redirect to the page the user was browsing?
  5. vchris

    Date format function

    convert(date,closure,107) AS closureType date is not a defined system type.convert(varchar,closure,107) AS closureWorks but does not display correct style (2006.07.00). There seems to be a 00 value for the day. Can this query work with this 00 value?
  6. vchris

    style switcher

    Is there a way I can check if the session is not blocked? So you would recommend only using session, no cookies?
  7. vchris

    style switcher

    What's the best way to create a PHP style switcher?I've looked a bit into it but I want something as clean as possible and that'll always work. I don't really wanna use the querystring. Cookies are good but what about if cookies are blocked? Session variable?
  8. vchris

    Domain Name

    http://vchris.net/about/abouttest_e.phpthoughts?
  9. vchris

    Date format function

    [Macromedia][sqlServer JDBC Driver][sqlServer]'MONTHNAME' is not a recognized function name.SQL:SELECT NPRI_ID, Comp_Name, Faci_Name, ProgramRef, MONTHNAME(closure) AS month, DAYOFMONTH(closure) AS date, YEAR(closure) AS year FROM QM3_Facility WHERE NPRI_ID LIKE '%06067' AND ReportYear = '2006'
  10. vchris

    Domain Name

    [ Solved ]I got the direction working pretty well now.The thing is I want an image to be the link to slide the div. I want the image to be on the left border of the div so when it's closed you only see the image (like a tab) and when you click it, it opens the div and it slides with it. I thought the simplest way was to include the image in the sliding div except seems like the way this is coded that anything that's inside the div will be hidden when closed.PHP: http://www.vchris.net/about/abouttest_e.phpJS: http://www.vchris.net/about/animatedcollapse.jsIf you got some skill in JS and think there's a way to fix this, let me know. I've been working on this for a couple hours and can't find a way to do it. I've already tried adding 50px to the width but doesn't seem to work.
  11. vchris

    Date format function

    no idea... I don't know what DBMS is. I only do the front end.
  12. vchris

    Date format function

    Ok but those are for the current time. What I need is to format a date that is already in the db.
  13. What's the date format function with SQL? I found the Convert function but it sucks... got anything else?
  14. vchris

    Domain Name

    What do you mean exactly?I'm pretty sure the direction is somewhere in the js file. Here is the function I think is responsible for the direction:animatedcollapse.prototype._slideengine=function(direction){ var elapsed=new Date().getTime()-this.startTime //get time animation has run var thisobj=this if (elapsed<this.timelength){ //if time run is less than specified length var distancepercent=(direction=="down")? animatedcollapse.curveincrement(elapsed/this.timelength) : 1-animatedcollapse.curveincrement(elapsed/this.timelength) this.divObj.style.width=distancepercent * this.contentwidth +"px" this.runtimer=setTimeout(function(){thisobj._slideengine(direction)}, 10) } else{ //if animation finished this.divObj.style.width=(direction=="down")? this.contentwidth+"px" : 0 this.isExpanded=(direction=="down")? "yes" : "no" //remember whether content is expanded or not this.runtimer=null }}
  15. vchris

    Domain Name

    I want to add a sliding panel on the about page. I found one that slides up and down and switched from side to side instead. The problem is I'd like the left border to close on the right border of the div. I would also like for the text not to wrap when the div closes. Any idea how I could change that?Example 2:http://vchris.net/about/slider.htmhttp://vchris.net/about/animatedcollapse.jsedit: I got the no wrap going... All I'm missing is the sliding from the other side.
  16. I'm not sure which part you want to have the image and black background but here's the code.#someid {background: url('images/someimage.jpg') no-repeat center #000000;}not exactly 100% sure about the center if it'll center it in the middle of you're div if not maybe add middle after center.
  17. I always start coding my sites in Firefox and usually there isn't much to change to have it cross-browser compatible.It might be the experience...
  18. So about the image resizing. The problem with resizing is that let's say you have a picture of 1000x1000 and you resize to 200x200. On the size it'll look jagged because of the html resize and even though it's resized to 200x200 on the webpage, the file size is still the 1000x1000 image. The easiest solution is to use an image editor and edit those images to whatever size is best for you, this way the file size is reduced (faster load times) and better image quality on the webpage. If not then you'll probably need to use javascript or a server-side language to resize the images depending on their size. Here's a link to google for scripts: http://www.google.ca/search?client=firefox...G=Google+SearchSecond question I'm not exactly sure but I know with javascript you can specify a name for the window so it'll always open in the same window. You could also use anchors to always open the window at the specific location of the image.http://www.w3schools.com/html/html_links.asp
  19. vchris

    Domain Name

    Before I do the css switcher, I want to replace the bottom nav with icons. I already have 3 of the 4 I need. The icons I have are outlines of a house, letter, document in white. I need something for the about page. I'm thinking of a stick figure head and shoulders but it's kinda hard to do. I can't seem to get it right. Feel free to try and create it. If you have other suggestions for the about page let me know.
  20. vchris

    Domain Name

    Oh yeah I forgot about cookies. I never really worked with them in php so that'll be a great exercise. Cookies it is!
  21. vchris

    Domain Name

    Any other suggestions?The other thing I had in mind was a style switcher, one for red, green and blue (RGB). What if some of the images (nav) are not in the css, would I need some session variable so I know which style to show or is there another way?
  22. vchris

    Domain Name

    I don't know... I heard it was better with the import way.edit: I just did a bit of reading on @import vs link and it seems that @import is mainly for including a stylesheet in a stylesheet and link is for normal inclusion of a stylesheet in a webpage. If you are thinking of adding a style switcher to your site then you'll have to use <link>.I guess I'll be switching to links.print.css works now!
  23. vchris

    Domain Name

    boen_robot I added the print.css stylesheet on this page (http://www.vchris.net/about/abouttest_e.php). It doesn't create any errors but when I do a print preview I still see all the images.
×
×
  • Create New...