theHop 18 Newbie Poster

SELECT * INTO tblsales
FROM tblsalesdummy

theHop 18 Newbie Poster

might just be that the images need to be optimised for the web. you could add a small delay

setTimeout(function(){
    startSlideShow(ob);
},2000); 

added delay of 2 seconds but you would need to change this to whatever you feel is right.

theHop 18 Newbie Poster

i was just looking in dev tools in chrome. it looks like 2 absolutely positioned divs side by side with each img as a fixed bg img. then testing where mouse pos is in relation to whichever side, the div's left/right position and width are animated.

so if on the designer side, the designer div's left and width increase whilst the coder div's right and width decrease and vise versa. oh and opacity changes as well

theHop 18 Newbie Poster

As it stands you don't put the ids in the labels.Or anywhere on the formfor that matter.

you could add two extra hidden labels on the form where you store the ids and them pull their text into the parameters

theHop 18 Newbie Poster

Hi. In the example you give there is a combination of the javascript scroll event to test against the Id of a section compared to the scrollTop. this then actually does a "redirect". I put this in speach marks because the seems to stay the same but is using server side tech (and most likely a .htaccess file) to tell it which bookmark to go to. So it's actually probably the serverside that is changing the link colour as well.

if you're not bothered about the url changing you could do it with pure javascript. I would use a library (e.g. jquery) to make it easier for measuring the scroll top, though.

theHop 18 Newbie Poster

Could you not use an unordered list? Seems to suit the situation better

theHop 18 Newbie Poster

Text boxes and buttons are fully customisable with CSS. You can set background images, change borders etc

theHop 18 Newbie Poster

Is the wrapper the white rectangle at the back? If so add float:left to it's css

theHop 18 Newbie Poster

on line 39 is $name in that string a php variable?
if so should it not be

var parameters="char=<?php echo $name; ?>"
theHop 18 Newbie Poster

you also have some inline events on elements that aren't surrounded by quotes. eg line 80
<tr><td colspan=2><button onclick=newDevice();>Click to copy New Device Remarks</button></td></tr>

this should be

 <tr><td colspan="2"><button onclick="newDevice();">Click to copy New Device Remarks</button></td></tr>
theHop 18 Newbie Poster

in fact you've done the same with all of your elements. take the ".value" off the end of all lines from lines 7 - 29

theHop 18 Newbie Poster

line 29 has

var remarksbox = document.getElementById('Remarks').value;

but then after that you're doing

remarksbox.value = 

effectivly that translates as

remarksbox.value.value = 

change line 29 to:

var remarksbox = document.getElementById('Remarks');
theHop 18 Newbie Poster

do you mean you want to count how many dropdowns have a selection at all?

theHop 18 Newbie Poster

glad you got it...I thought doing away with the document.writes would do the trick!
Make sure you mark it as solved.

theHop 18 Newbie Poster

that line is just starting the string when the page loads.

theHop 18 Newbie Poster

hmmm...just realised when I refresh your page I get a brief flash of code before the page is re-written. could be a sign of whats going on

theHop 18 Newbie Poster

I just used the chrome dev tools and re-added the style sheet using a non-jQuery approach

var head = document.getElementsByTagName("head")[0];

var newLink = document.createElement("link");
newLink.setAttribute("rel","stylesheet");
newLink.setAttribute("href","style.css");
head.appendChild(newLink);

when I just view the source there is definately something written in there. can't quite see whats removing it

theHop 18 Newbie Poster

use keyup instead of keypress. just tried it and it worked better.

$('#txtbox').keyup(function() {

var textLen = $(this).val().length;
var textLeft = parseInt($(this).attr("maxlength")) - textLen;
$('#charCount').text(
    textLeft + ' character' + (textLeft == 1 ? '' : 's') + ' left'
);
});
$('#txtbox').keyup();

I added the maxlength attibute to your textbox and just grapped that in the javascript just to make the acript a bit more re-usable.

theHop 18 Newbie Poster

looking at the source, you have forgotten to close the last script tag.

Also. the callback function on your json function seems to be doing alot of document.writes. maybe pick an elementbyid and use innerHTML += instead of document.write.

the only reason I say this is because when I view your source in chrome developer tools the head section is empty. document.write can replace the whole page if fired in the head so deleting the reference to the style sheet.

theHop 18 Newbie Poster

whats the "+" symbol for? concatenation is being done with an ampersand everywhere else in your code.

Should it not be:
"javascript:void(window.open('http://test/forms/Su....aspx?BudgetId=" & Fields!budgetid.Value & "')"

theHop 18 Newbie Poster

try using parent.window.open

theHop 18 Newbie Poster

are there any errors in your console?

theHop 18 Newbie Poster

just need use AJAX. Do a quick search if you're not familiar with it. you would get the dynamic variables with an ajax call and then update the image in your javascript onclick event.

theHop 18 Newbie Poster

you're welcome. I'm on there as andhop if you want to follow :)

theHop 18 Newbie Poster

I recently undertook a development job where i needed to create a music player. We decided that the music should be managed from soundcloud.com (let them deal with the storage band width). There was one problem. to make it work in ALL modern browsers there needed to be be at least and MP3 version and an ogg version of each song. Of course soundcloud only provides an mp3 stream. So you wouldn't get any sound in Firefox.

after some trial and error with this. I eventually realised that if I uploaded the songs as ogg files and set it so people can download the song, I could use the download_url for the ogg format and still use the stream_url as the mp3.

This does actually work!.

Just thought it might help someone.

theHop 18 Newbie Poster

Hi. I had to rem-make it all together to get what I think you wanted. Have a look at this
http://jsfiddle.net/andy_hop/FyqwS/

theHop 18 Newbie Poster

@ArchAugust Glad it helped someone! you could give me an up vote if you like :)

theHop 18 Newbie Poster

This usually happens when you get an element by ID and then use the hadle forgetting to use innerText or innerHTML. e.g.

var div = document.getElementById("myDiv");

var text = "My div says " + div;

this would produce the string "My Div says [object Object]"

as pritaeas said, though. we would need to know which line causes the error.

theHop 18 Newbie Poster

How about

str = str.replace(/\u0160/g,"");
riahc3 commented: That was it +4
theHop 18 Newbie Poster

taking the plus out would replace all whitespace chars with nothing

variable.replace(/\s/g,"");

if it's not working maybe there's something in the code surrounding this that needs debugging.

theHop 18 Newbie Poster

if it's populated at runtime just do this:

<div id="targetspace"><?php include description.php; ?></div>
theHop 18 Newbie Poster

@EvolutionFallen Yes. I was assuming it already was declared outside the function somewhere. Probably should've mentioned that :S

theHop 18 Newbie Poster

Not as far as I'm aware. but if converted to string it can be converted back to Integer afterwards. Seems an odd requirement though. can't actually see how this would affect a client at all!

theHop 18 Newbie Poster

what about this

var cont = document.getElementById("content");
cont.innerHTML = "";
var s = document.createElement("script");
s.type = "text/javascript";
s.src = \"js\/demo.js\";

cont.appendChild(s);
theHop 18 Newbie Poster

what are the commas for? plusyou have missed a forward slash on image path. this May work

function nxtimg(country){
  document.getElementById("imgcont").src="images/" + country + "/" + imgs[i] + ".jpg";
  i++;
}
theHop 18 Newbie Poster

I've ended shortening then script at the same time. I swapped your textarea out in favour of a div and put all your urls in a object literal. (could have been an associative array. Makes no difference really.

<script type="text/javascript">

links = {
        A:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I21263C4FA139C15D7BAC/ical.ics",            
        B:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I212NEKA9Y139E57D8DDA/ical.ics",
        C:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I212WPEPUP1396F85E02B/ical.ics",
        D:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I212NEKA9Y139E57D8DDA/ical.ics",
        E:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I212ETT9PK139C15F2C25/ical.ics",
        F:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I212Y6WMF4139C1C22637/ical.ics",
        G:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I212AT4NRY139C165DB97/ical.ics",
        H:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I212XH7AWH139C160ED75/ical.ics",
        I:"https://ical.bookeo.com/20212KWWNLA1396F7FEA1BWFW3J6/LHRAKRK63FAMPJP6/Z/I2123X6H36139C1C1A4E5/ical.ics"    
};

function fifa()
{
    var link = document.getElementById("link");
    var frm = document.forms[0];
    var abc = frm.browsers.value;
    link.innerHTML = "<a href=\"" + links[abc] + "\">" + links[abc] + "<\/a>";
}
</script>
</head>
<body>
<center>
<form name="form1">
Subscribe to your calendar link:
<select id="browsers" onchange="fifa()">
<option value="0">- choose a tutor -</option>
<option value="A">Ashley C.</option>
<option value="B">Danielle C.</option>
<option value="C">Jon S.</option>
<option value="D">Mekenna M</option>
<option value="E">Norma C.</option>
<option value="F">Tyler K.</option>
<option value="G">Vanessa A.</option>
<option value="H">Veronica G</option>
<option value="I">William K.</option>
</select><br><br>

<div id="link" style="width:400px; height:100px;">
</div>
</form>
theHop 18 Newbie Poster

@Taywin no worries...thats why I gave you an up vote. :). If it was for my own program I wouldn't have used a local variable either.

(I don't mind if you give me an up vote too :))

theHop 18 Newbie Poster

@Taywin I played with returning the raw output but decided to put it in a variable to make it easier to read for @izic. I think he maybe only just be learning javascript.

theHop 18 Newbie Poster

have you set an outgoing server address in your php.ini file?

theHop 18 Newbie Poster
<script>
    var hidden = true;

    function ToggleTB(){
        var tb = document.getElementById("divText");
        if(hidden){
            tb.style.display = "block";
            hidden = false;
        }else{
            tb.style.display = "none";
            hidden = true;
        }


    }
</script>
<input type="radio" onclick="ToggleTB();" checked />
<div id="divText" style="display:none;"><textarea></textarea></div>

Having the global 'hidden' variable to check against means that the textarea's display can be checked from the start without inline sty;e being set.

theHop 18 Newbie Poster

no global variables neccesary

<script>

    function toDays(years) {
       var time = 365 * years;
       return time;
    }
    document.write("My age is " + toDays(21));
</script>
Taywin commented: Good example +11
theHop 18 Newbie Poster

So when you say the combe will be get it's values from a database. Are you pulling the values using ajax?

if thats the case then let the php script generate the dropdown then pull it in the responseText.

when checking this many form fields I don't fully see how an ID will help. you are probably going to be best to loop through each row. break it down into smaller functions. this will make it easier to write.

I'll come back with some functions in a bit. Family life is calling :S

theHop 18 Newbie Poster

Ok. I've written a new addSubRow function

function addSubRow2(cell){

        var dropdown = "<SELECT class=\"select\" name=\"country\">\n" +
                "<OPTION value=\"in\">India<\/OPTION>\n" +
                "<OPTION value=\"de\">Germany<\/OPTION>\n" +
                "<OPTION value=\"fr\">France<\/OPTION>\n" + 
                "<OPTION value=\"us\">United States<\/OPTION>" +
                "<OPTION value=\"ch\">Switzerland<\/OPTION>" + 
                "<\/SELECT>";

        cell.innerHTML += "<br\/ >" + dropdown;
    }

the onclick attribute for the button needs to be:

<INPUT type="button" value="Add Combo" onclick="addSubRow2(this.parentNode);" />

so this adds a new combo to the cell. I haven't accounted for the P tag after that looks like it holds a error. I didn't know if it was supposed to have one of them for every combo or not. I've also removed the ID attribute of the dropdown as I noticed that every time you add a row it gives the dropdown exactly the same ID. You could find the cell in the DOM and loop through the combos for the values.

theHop 18 Newbie Poster

post the css you are using and let us know if you where in your file/folder structure your images are in relation to the stylesheet.

There isn't anything different in Chrome for displaying backround images.

theHop 18 Newbie Poster

@klemme did this solve your issue?

theHop 18 Newbie Poster

Do you mean something like this?

var target_cell = document.getElementById("cell_id");
var list = "<select>" +
           "<option value=\"value1\">Val 1<\/option>" +
           "<option value=\"value2\">Val 2<\/option>" +
           "<\/select>";

target_cell.innerHTML = list;
theHop 18 Newbie Poster

what @JorgeM said is the only reason I said that I would use JQuery. It's not that there's anything wrong with the CSS transitions but I know it won't work on everyone's browser. It's just personal choice at the end of the day.

the good thing about CSS3 transitions is that, for browsers that support it, it will work as most (or none as far as I'm aware) browsers don't have a setting to turn CSS off but they do for Javascript.

I, personally would never dream of using an out of date browser. but there are people who don't update them. there are also alot of actual organisations that (for some odd reason) stay 2 versions behind the latest at all times. this is where JQuery (or even native js) come in.

theHop 18 Newbie Poster

you could use JQuery's ajax api to communicate with the php script.

theHop 18 Newbie Poster

so does it never get to alert("Other2")?

Try wrapping the var output = searchData(data, "Other") in a try-catch and alert the message. See if anything comes up.

theHop 18 Newbie Poster

Hi. looking at the css on the site they are actually using CSS3's transitions.

have a look here http://www.w3schools.com/css3/css3_transitions.asp for a little help on it. personally, I would probably use JQuery for it.