Demetri Tashie
Forum Replies Created
-
-
one thing to look at is that you are not typing your javascript scripts to ‘type=”text/javascript”. This should be done for the linked(accompaning) file as well as the embedded file.
W3C states that “Authors should specify the default scripting language for all scripts in a document”
without correct script typing, it is possible that some browsers might not recognize what language the script is written in, and therefore won’t be able to execute the script.
example:
<script type="text/javascript"> -
Moodle might very well have a solution already in place, and probably deserves a second glance.
that being said, what it boils down to is having access to your client’s database. if the student’s info is placed in a database ( such as MySQL), then it can be accessed online via PHP coding. password protecting the page, and requiring a password/PIN to access specific rows/fields of the database ( a certain student’s info for example) is of course possible.
some local database programs ( Filemaker Pro for instance) integrate well with MySQL.
If you can’t find a ready made solution, a developer can work this out for you.
-
see the note above the posting box:
Note: The following are HTML characters and may cause parts of your post to disappear if not used correctly: <>&
BUT, to prevent insertion of nasty code, it will strip out actual html tags. so if you want to show
<h2> hello <h2>you actually have to write at least the ‘less than’ symbol with it’s unicode equivalent: & g t ; (without any white spaces)
to be safe do the same for ‘greater than’ symbol: & g t ; (without any white spaces)
that’s what i think is going on and how i get around it. maybe an administrator can explain it better.
tip: copy your code into a text editor, then do a ‘find’ and ‘replace all’ of the ‘less thans’ and ‘greater thans’ at once
-
if you post a link to the page we could really see what is going on, and could actually view
the htmlin the meantime, you might want to look at this article on laying out 3 column pages.it might help you understand and work with them:
https://matthewjamestaylor.com/blog/perfect-3-column.htm
-
Demetri Tashie
November 19, 2011 at 4:04 am in reply to: Pagination without using a database or cms?hi jessica,
if this response is not too late, i have some suggestions. i don’t see why this can’t be done with a combination of php includes and javascript.
it is hard to tell from your description if this is what you meant, but i would certainly consider the student’s pages being includes also. then through javascript you can have the button clicks load in a new, and correct, student page, as well as change the copy on the home page to take care of your ‘pagination’.
you can see a real simple working example here
the main html page just has 5 divs:
a header and footer div which load in content via php includes
there is a div to contain the ‘page number’/pagination information
a div for the actual page content to load into via php includes,
and a div for the buttonssome pretty simple javascript in the header changes the contnet div and the page number div via innerHTML
there are other ways, but i just made an array to hold all the page content incudes ( this would be your student page information)
and just as Curtis suggests, there is a variable there which is used to keep track of/be aware of what page is laoding in/ what page number it is. then going to a next or previous student page would be easy.
this is the javascript i used. i didn’t bother to put any limits on the button clicks to keep them from going beyond their bounds, and i only have 3 actual pages in the array – therefor you will see ‘undefined’ in the content area div for pages missing from the array.
var i=1;var myArray= new Array();
myArray[1]="<?include('main1.php');?>";
myArray[2]="<?include('main2.php');?>";
myArray[3]="<?include('main3.php');?>";function next()
{
++i;
document.getElementById("pageNum").innerHTML= "Page "+i+""
document.getElementById("main").innerHTML= myArray[i];
}function prev()
{
--i;
document.getElementById("pageNum").innerHTML= "Page "+i+""
document.getElementById("main").innerHTML= myArray[i];
}
anyway, i hope this helps or gives you ideas opn how you can make it work for you. if you need anything exaplained, just ask.
